Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
No such thing as a small change
 
PerlMonks  

Re^3: Homework help

by ikegami (Patriarch)
on Oct 30, 2004 at 13:55 UTC ( [id://404045]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re^2: Homework help
in thread Homework help

I would have predicted that the last unless defined would not work right on empty input b/c $_ still contains a "\n"
It doesn't work on empty input. It works on eof/error. It's there to prevent the next two lines from giving "undefined value" warnings under use warnings. The last unless length that follows is what detects the empty string (since chomp removed the "\n" by then).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://404045]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.