Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: eof not recognised when applying diamond operator to invocation arguments?

by Anonyrnous Monk (Hermit)
on Jan 12, 2011 at 16:53 UTC ( #881945=note: print w/replies, xml ) Need Help??


in reply to Re^2: eof not recognised when applying diamond operator to invocation arguments?
in thread eof not recognised when applying diamond operator to invocation arguments?

Why is the code I posted not behaving equivalently to ...

because in your original code the eof is tested only once before everything is being read and output.  In the second case, it's tested for every line, so it has a chance to detect the end-of-file conditions.

  • Comment on Re^3: eof not recognised when applying diamond operator to invocation arguments?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://881945]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2018-07-17 21:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (378 votes). Check out past polls.

    Notices?