Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Re: while modifier

by Anonymous Monk
on Sep 21, 2001 at 01:05 UTC ( #113704=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://113704]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2023-11-29 19:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?