in reply to
Re: while modifier
in thread
while modifier
my $foo_text; # this also works
$foo_text is not being initialized to $_ ?
I thought
my $foo_text .= $_ while (<DATA>);
was the same as a declaration/initialization statement
my $foo_text = "text";
Comment on
Re: Re: while modifier
Replies are listed 'Best First'.
Re: Re: Re: while modifier
by
suaveant
(Parson)
on Sep 21, 2001 at 01:07 UTC
Well, the first time it is undef, so it is undef .= $_... every time after that it has a value... it is a warning not an error.
- Ant
- Some of my best work -
Fish Dinner
[reply]
Re: Re: Re: Re: while modifier
by
Anonymous Monk
on Sep 21, 2001 at 01:12 UTC
Thanks Much ;]
[reply]
In Section
Seekers of Perl Wisdom