in reply to Re^3: How to safely use $_ in a library function?
in thread How to safely use $_ in a library function?
Sounds good; but, if I add
Internals::SvREADONLY($_, 0);
to the code I gave above, immediately before the line $_ = 'fred';, I still get:
1:03 >perl 723_SoPW.pl literal1 Modification of a read-only value attempted at 723_SoPW.pl line 26. 1:03 >perl -v This is perl 5, version 18, subversion 1 (v5.18.1) built for MSWin32-x +86-multi-thread-64int ...
Also, where and how can I learn about a feature that is “intentionally-undocumented”? (This is a serious question!)
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: How to safely use $_ in a library function?
by hdb (Monsignor) on Sep 18, 2013 at 15:21 UTC | |
|
Re^5: How to safely use $_ in a library function?
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 | |
by tobyink (Canon) on Sep 19, 2013 at 08:16 UTC | |
|