If your caller wanted you to know what args it was called with, it would have told you.Just to be clear, for the last example I wanted the BLANK to be bound to test2's $_[0] and not the caller of the anon sub's $_[0]. (And I realize it probably can't be done.)
$_[0]="not me"; $f=test2("arg1"); $f->("arg2"); # should print "arg1, arg2"
In reply to Re^2: $_, one lexical scope removed
by sleepingsquirrel
in thread $_, one lexical scope removed
by sleepingsquirrel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |