sub mylength(_) { length($_[0]); };
Ah! So you use the positional form of the argument (ie. $_[n]) and if that position is unpopulated, perl supplies the value of $_.
Got it. (Some mention of using $_[n] in the docs would be good :)
In reply to Re^2: Prototype (_)?
by BrowserUk
in thread Prototype (_)?
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |