in reply to Re^2: How to safely use $_ in a library function?
in thread How to safely use $_ in a library function?
"There doesn’t appear to be any way to undo this effect. :-("
sub foo { Internals::SvREADONLY($_, 0); $_ = 'fred'; goto &bar; }
The intentionally-undocumented Internals package is part of Perl core (so much so that you don't even need to use it - it's completely internal, like parts of utf8 are) and has nothing much to do with the Internals module on CPAN.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: How to safely use $_ in a library function?
by Athanasius (Archbishop) on Sep 18, 2013 at 15:09 UTC | |
by hdb (Monsignor) on Sep 18, 2013 at 15:21 UTC | |
by tobyink (Canon) on Sep 18, 2013 at 15:28 UTC | |
by Athanasius (Archbishop) on Sep 18, 2013 at 15:47 UTC | |
by tobyink (Canon) on Sep 19, 2013 at 07:10 UTC | |
by Athanasius (Archbishop) on Sep 19, 2013 at 07:43 UTC | |
|