Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: Iterator to parse multiline string with \\n terminator

by tinita (Parson)
on Oct 06, 2013 at 12:46 UTC ( #1057143=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Iterator to parse multiline string with \\n terminator
in thread Iterator to parse multiline string with \\n terminator

return $line unless $line;
make that:
return $line unless defined $line;
theoretically the last line could be missing the newline and only contain "0". then $line would be false and ignored with your code.


Comment on Re^3: Iterator to parse multiline string with \\n terminator
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (10)
As of 2015-07-05 20:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (67 votes), past polls