perl591delta:
=head2 Lexical $_The default variable $_ can now be lexicalized, by declaring it like any other lexical variable, with a simple
The operations that default on $_ will use the lexically-scoped version of $_ when it exists, instead of the global $_.my $_;In a map or a grep block, if $_ was previously my'ed, then the $_ inside the block is lexical as well (and scoped to the block).
In a scope where $_ has been lexicalized, you can still have access to the global version of $_ by using $::_, or, more simply, by overriding the lexical declaration with our $_.
In reply to Re^4: subroutine bewilderment: how to mimic builtins
by ysth
in thread subroutine bewilderment: how to mimic builtins
by dimar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |