in reply to Shifting of 2D array slices
It looks like you want something like this:
$ perl -le' use Data::Dumper; my @bigarray = ( [ "123*jeff", "tortoise", "qwerty" ], [ "456*john", "parrot", "azerty" ], [ "789*jane", "budgie", "abcdef" ], ); print Dumper \@bigarray; @bigarray = map [ map split( /\*/ ), @$_ ], @bigarray; print Dumper \@bigarray; ' $VAR1 = [ [ '123*jeff', 'tortoise', 'qwerty' ], [ '456*john', 'parrot', 'azerty' ], [ '789*jane', 'budgie', 'abcdef' ] ]; $VAR1 = [ [ '123', 'jeff', 'tortoise', 'qwerty' ], [ '456', 'john', 'parrot', 'azerty' ], [ '789', 'jane', 'budgie', 'abcdef' ] ];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Shifting of 2D array slices
by holli (Abbot) on Dec 07, 2008 at 00:57 UTC | |
by kyle (Abbot) on Dec 07, 2008 at 03:37 UTC | |
|
Re^2: Shifting of 2D array slices
by AnomalousMonk (Archbishop) on Dec 07, 2008 at 06:16 UTC |