Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
Just another Perl shrine
 
PerlMonks  

Re (tilly) 2: ..."while" i do perl...

by tilly (Archbishop)
on Jan 29, 2001 at 02:54 UTC ( [id://54941]=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: ..."while" i do perl...
in thread ..."while" i do perl...

This comes up periodically. The answer is in perlsub, if you omit the parens there is an implicit set of arguments passed which might not be what you want. I consider this a dangerous style because even if you know about the gotcha, the person after you might not.

Two other relevant notes. There is a promise that future Perl built-in functions will be lower case, so some people like using mixed-case function names. Also using the & is (IIRC) considerably slower than not using it.

Personally I used to use & all of the time, but now I never do. I don't consider the arguments either way particularly convincing on that. But I always put in the parens.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://54941]
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.