[linux-help] Perl confusion
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Please take a look at this Perl code:
--------------------
....
open(JDATA, "junk.data") || die "can't open junk.data : $!";
while ($first = <JDATA>) {
chomp($first);
$word = <JDATA>;
chomp($word);
$cheap = <JDATA>;
chomp($cheap);
test_word($first, $word, $cheap);
}
close (JDATA) || die "can't close junk.data: $!";
sub test_word {
my($firstname, $lastname, $cheapgift);
($firstname, $lastname, $cheapgift) = @_;
open(JUNKMAIL, "junkmail") || die "can't open junkmail : $!";
...
--------------------
For some reason the variables are not getting passed to the
subroutine; they're claiming to not be initialized. I haven't touched
Perl in over a year and am a bit rusty....
-- This is the linux-help@xxxxxxxxx list. To unsubscribe,
visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi
- [linux-help] Perl confusion,
Lrs v.d.Ast <=
|
|