Beefy Boxes and Bandwidth Generously Provided by pair Networks Russ
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^4: while loop

by blazar (Canon)
on Apr 26, 2006 at 06:23 UTC ( [id://545741]=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^3: while loop
in thread while loop

Well, perldoc perlsub explains it all. In brief, do not use the &-form unless you know what you're doing, i.e. either circumvent prototypes, if you're giving an explicit arg list or make current @_ visible to the sub, as you say.

Replies are listed 'Best First'.
Re^5: while loop
by gellyfish (Monsignor) on Apr 26, 2006 at 06:28 UTC

    ... or when dereferencing a CODEREF or a symbolic reference to a subroutine name, or taking a reference to a subroutine, or when using the subroutine as an argument to goto ...

    /J\

      Indeed! And well done to point out - although we were talking about sub calls. However when dereferencing I'd recommend using (again: unless one knows what she's doing and has good reasons to!)

      $subref->(@args);

      This is not merely cosmetic: I actually met a situation in which a module using &$subref(@args) caused a bad interaction with some subs.

Log In?
Username:
Password:

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