Complete.Org: Mailing Lists: Archives: linux-help: July 2000:
[linux-help] Re: Perl confusion
Home

[linux-help] Re: Perl confusion

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: linux-help@xxxxxxxxx
Subject: [linux-help] Re: Perl confusion
From: Steven Saner <ssaner@xxxxxxxxxxxxxxx>
Date: Mon, 17 Jul 2000 23:44:27 -0500
Reply-to: linux-help@xxxxxxxxx

There isn't anything wrong with this code. It must either be with your
data file or some other part of your code.


On Mon, Jul 17, 2000 at 11:58:16PM -0500, Lrs v.d.Ast wrote:
> 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

-- This is the linux-help@xxxxxxxxx list.  To unsubscribe,
visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi


[Prev in Thread] Current Thread [Next in Thread]