Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Answer: undef vs. $foo = 0

( #163711=categorized answer: print w/ replies, xml ) Need Help??

Q&A > input and output > undef vs. $foo = 0 contributed by crazyinsomniac

The best method is
foreach $foo(@foo) { $bar = $some + $thing; }
no need for an intermediary step unless you're doing something with $bar.

If $bar has a default value, set it to that value, otherwise undef.

Comment on Answer: undef vs. $foo = 0
Download Code
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2014-08-28 09:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (259 votes), past polls