Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^4: <STDIN> not initializing $_

by stiller (Friar)
on May 01, 2008 at 05:39 UTC ( #683860=note: print w/ replies, xml ) Need Help??


in reply to Re^3: <STDIN> not initializing $_
in thread <STDIN> not initializing $_

An extra edge case:
perl -le'while($a = 0){print "$a ok\n"; last }' # perl -le'while($a = 1){print "$a ok\n"; last }' # prints 1 ok
But the "implicit test for defined" is built into the while( ) by language design, there is no extra magic about that in any context?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2016-06-28 18:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (360 votes). Check out past polls.