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. :-)
In reply to Re: Puzzled by array
by revdiablo
in thread Puzzled by array
by kiat
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |