Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re^2: CGI throws in an extra character. Why?

by Petras (Friar)
on Dec 01, 2004 at 20:07 UTC ( #411548=note: print w/replies, xml ) Need Help??

in reply to Re: CGI throws in an extra character. Why?
in thread CGI throws in an extra character. Why?

Just curious, then. I really don't know how to check, so I'll just ask (ah, ignorance and laziness....). Does  closedir execute if it is part of a  print statement? print ++$someVar; would execute the incriment even though it is part of a print statement. Are there any rules as to what executes as part of another statement and what doesn't?


Replies are listed 'Best First'.
Re^3: CGI throws in an extra character. Why?
by Your Mother (Bishop) on Dec 02, 2004 at 03:52 UTC

    I'm not a guru and I hope I don't misspeak but here's an offering: print is a list operator so it's always going to wait for everything to its right, w/i its precedence space, to finish. Perl is really great for its DWIMness in the sense that statements/subs/methods often act the way you'd expect or hope just from looking at them. The rules for that stuff is mostly just precedence (how strongly an operator or function wants to grab and act upon what's around it).

    Check out perlop for precedence info in all its gl?ory.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (2)
As of 2018-05-21 03:37 GMT
Find Nodes?
    Voting Booth?