Jump to letter: [
02349ABCDEFGHIJKLMNOPQRSTUVWXYZ
]
perl-lexical-underscore - Access your caller's lexical underscore
- Description:
Starting with Perl 5.10, it is possible to create a lexical version of the
Perl default variable $_.
It is occasionally useful for a subroutine to be able to access its caller's
$_ variable regardless of whether it was lexical or not. The "(_)" sub
prototype is the official way to do so, however there are sometimes
disadvantages to this.
The "lexical::underscore" function returns a scalar reference to either
a lexical $_ variable somewhere up the call stack (using PadWalker magic), or
to the global $_ if there was no lexical version.
Packages