in reply to Append array to array of arrays

There are multiple ways to do so, here are three:

$ cat u.pl use strict; use warnings; use Data::Dumper; my @AoA = ( [ "fred", "barney" ], [ "george", "jane", "elroy" ], [ "homer", "marge", "bart" ], ); # Add to beginning of array unshift @AoA, [ "pebbles", "bamm bamm", "dino" ]; # Splice into beginning of array splice @AoA, 0, 0, [ "Fred", "Velma", "Shaggy", "Scooby" ]; # Rebuild with new entry at beginning @AoA = ( [ "Bugs", "Daffy" ], @AoA ); print Dumper(\@AoA); $ perl u.pl $VAR1 = [ [ 'Bugs', 'Daffy' ], [ 'Fred', 'Velma', 'Shaggy', 'Scooby' ], [ 'pebbles', 'bamm bamm', 'dino' ], [ 'fred', 'barney' ], [ 'george', 'jane', 'elroy' ], [ 'homer', 'marge', 'bart' ] ];

...roboticus

When your only tool is a hammer, all problems look like your thumb.