*$_ = sub ... doesn't work if $_ is an integer.Not true. Did you try it?
$ perl -we'*$_ = sub { print "I am 1 $_[1].\n" } for 1; $x = bless {}; + $meth = "1"; $x->$meth("world")' I am 1 world.
$_ isn't a lexical, so it doesn't get captured, producing "I am world" for output.Correct.
What's after the -> has to start with a $, so do { @ARGV } wouldn't work even if it did return a scalar.dragonchild was responding to my suggestion that ->do{} be made to work.
In reply to Re^6: Dynamically constructed function calls
by ysth
in thread Dynamically constructed function calls
by WalruZ
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |