in reply to Reference madness
changes the contents of the array, but \@say remains the same, i.e. what you assign to $b{$name} is still the same array.@say = keys %{$h{$kind}{$name}};
The common solution to the problem is to declare a new array for each iteration of the loop, i.e. use
which will create a fresh new array with different \@say for each iteration of the loop;my @say = keys %{$h{$kind}{$name}};
or create an anonymous array:
$b{$name} = [ @say ];
($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: Reference madness
by sdani (Novice) on Jul 31, 2017 at 12:58 UTC | |
by choroba (Cardinal) on Jul 31, 2017 at 13:32 UTC | |
by Athanasius (Archbishop) on Jul 31, 2017 at 13:39 UTC | |
by LanX (Saint) on Jul 31, 2017 at 14:55 UTC | |
by Anonymous Monk on Jul 31, 2017 at 13:28 UTC |