Perl: the Markov chain saw | |
PerlMonks |
Re: What is the point of the & sigil for function refs?by grinder (Bishop) |
on Feb 04, 2005 at 13:28 UTC ( [id://428051]=note: print w/replies, xml ) | Need Help?? |
Is there ever a scenario when it's preferrable to use the & There is one dramatic difference that occurs when you call the function without a parameter list:
When using the &inner variant, whatever remains of @_ in the calling routine is passed to the called routine. The only time it's really useful is when doing out-of-the-ordinary stuff like autoloading. In general you should avoid it. It leads to bad surprises PS: metasyntactic function call arguments courtesy of BooK's Acme::MetaSyntactic module, the donmartin theme. - another intruder with the mooring in the heart of the Perl
In Section
Seekers of Perl Wisdom
|
|