in reply to Puzzled by array
First you make a copy of @letters:
my @new = @letters;
Then you change @letters directly:
my $myshift = shift @letters; push(@letters, $myshift);
But you never change the copy. Why would you expect it to be changed?
Update: ugh, Tanktalus is right. I didn't read the code carefully enough. Please read his reply instead. :-)
|
---|