in reply to Calling splice() on Immutable Arrays
#!/usr/bin/perl use warnings; use strict; use feature qw{ say }; use Readonly; Readonly my @arr => qw( a b c ); say "@arr"; eval { $arr[1] = 'B' }; say "@arr"; eval { splice @arr, 1, 1, 'C' }; say "@arr"; __END__ Output: a b c a b c a b c
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Calling splice() on Immutable Arrays
by SankoR (Prior) on Jul 13, 2016 at 10:22 UTC |