I want to iterate over this to convert each row to:[ ['123*jeff','tortoise','qwerty'] ['456*john','parrot','azerty'] ['789*jane','budgie','abcdef'] ]
Since I don't know how much additional data there is at the end*, I want to shift the data off, then unshift it back on. However, I am having great difficulty with shift; it doesn't seem to want to work. The splitting of the string is trivial; it's the shift/unshift which is being sticky.['123','jeff','tortoise','qwerty']
returns:my @row = $bigarray[$count]; print "dumper1:".Dumper(@row); my $item = shift @row; print "dumper2:".Dumper($item);
* Actually, I do, it varies.dumper1:$VAR1 = [ '<a href="http://www.wizards.com/default.asp?x=dnd/comp/mess +age" title="Click to Subscribe" >Berronar\'s Salve</a>', 'Heroic', '<em>Forgotten Realms Player\'s Guide</em>' ]; dumper2:$VAR1 = [ '<a href="http://www.wizards.com/default.asp?x=dnd/comp/mess +age" title="Click to Subscribe" >Berronar\'s Salve</a>', 'Heroic', '<em>Forgotten Realms Player\'s Guide</em>' ];
In reply to Shifting of 2D array slices by Ryuchi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |