Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: "defined" in while loop Edit | Delete | Quote | Reply | Private Reply

by ELISHEVA (Prior)
on Feb 17, 2009 at 00:34 UTC ( #744249=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $  perl -e'print 0' | perl -e'while ($line = <>) { print "\$line=<$lin
    +e> \$line=<" . ($line ? "true" : "false") . "> defined=<" . (defined(
    +$line) ? "true" : "false") . ">\n"};'
    $line=<0> $line=<false> defined=<true>
    
  2. or download this
    $ perl -e'print 0' | perl -e'while ($line = readline(*STDIN)) { print 
    +"\$line=<$line> \$line=<" . ($line ? "true" : "false") . "> defined=<
    +" . (defined($line) ? "true" : "false") . ">\n"};'
    $line=<0> $line=<false> defined=<true>
    
  3. or download this
    use strict;
    use warnings;
    ...
      #print "wrapped_readline: <$sLine>\n";
      return $sLine;
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2016-10-01 18:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?






    Results (5 votes). Check out past polls.