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, |
In reply to Re^8: How to safely use $_ in a library function?
by Athanasius
in thread How to safely use $_ in a library function?
by perl-diddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |