in reply to Re^7: How to safely use $_ in a library function?
in thread How to safely use $_ in a library function?
Yes, it seems to work as advertised:
17:39 >perl -Mstrict -wE "my $s = 42; say $s; ++$s; say $s;" 42 43 17:39 >perl -Mstrict -MConst::Fast -wE "const my $s => 42; say $s; ++$ +s; say $s;" 42 Modification of a read-only value attempted at -e line 1. 17:39 >
How does that help?
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: How to safely use $_ in a library function?
by tobyink (Canon) on Sep 19, 2013 at 08:16 UTC | |
by Athanasius (Archbishop) on Sep 19, 2013 at 09:31 UTC |