$ perl -wE 'my $t = sub { uc(@_)}; say $t->("foo")' 1
uc has a prototype which forces scalar context, so uc(@_) evaluates to the number of elements in @ (upper-cased).
In reply to Re: Answer: How do I get a reference to a builtin function?
by moritz
in thread How do I get a reference to a builtin function?
by adram
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |