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";

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

      Thanks Much ;]