Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: parm#4 from caller == !"eval" ?

by LanX (Bishop)
on Sep 12, 2017 at 23:13 UTC ( #1199242=note: print w/replies, xml ) Need Help??


in reply to Re^2: parm#4 from caller == !"eval" ?
in thread Re: parm#4 from caller == !"eval" ?

Addendum to explain what the &x2 call does

> Subroutines may be called recursively. If a subroutine is called using the & form, the argument list is optional, and if omitted, no @_ array is set up for the subroutine: the @_ array at the time of the call is visible to subroutine instead. This is an efficiency mechanism that new users may wish to avoid.

Source perlsub

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

Replies are listed 'Best First'.
Re^4: parm#4 from caller == !"eval" ?
by perl-diddler (Hermit) on Sep 13, 2017 at 22:38 UTC
    To you and choroba, thanks for the example(s). I completely forgot about the '&' case.

    Thanks!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2018-01-19 00:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (215 votes). Check out past polls.

    Notices?