$ perl -MData::Alias -E' @_ = ( a=>4 ); alias %_ = @_; $_[1]=5; say $_{a}; $_{a}=6; say $_[1]; ' 5 6
However, copying args is a good thing. That's why we don't access @_ directly.
In reply to Re^4: Why doesn't Perl provide %_ as the hash equivalent of @_ in subs?
by ikegami
in thread Why doesn't Perl provide %_ as the hash equivalent of @_ in subs?
by smls
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |