Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: strange code (de)referencing behaviorby choroba (Cardinal) |
on Feb 10, 2012 at 15:37 UTC ( [id://953051]=note: print w/replies, xml ) | Need Help?? |
Calling a subroutine this way forwards the @_ arguments. (Try sub f { say while $_ = shift; warn "Called\n" } %d = (1 => \&f); sub g { &{$d{1}} }; g(1, 2).) If you want to avoid that, use -> for dereference:
In Section
Seekers of Perl Wisdom
|
|