Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^4: do {$i++} until vs. $i++ until

by hipowls (Curate)
on Mar 25, 2008 at 09:17 UTC ( #676077=note: print w/ replies, xml ) Need Help??


in reply to Re^3: do {$i++} until vs. $i++ until
in thread do {$i++} until vs. $i++ until

True they are not functionally equivalent but I didn't care to replicate the bug of looping on a closed file descriptor;-) It works properly when used in a command pipeline.

As far as last INPUT if $line eq ".\n" goes it is probably correct to put it at the top of the loop since ".\n" is being used as an equivalent to EOF. Whatever is done with ".\n" most likely requires special handling of some sort, for example a sendmail equivalent wouldn't include it in the message and would treat it the same as EOF.


Comment on Re^4: do {$i++} until vs. $i++ until
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2015-07-07 03:49 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 (87 votes), past polls