in reply to Please help with arrays

I don't know what you mean by "gate (10.1.254.254)", etc. but, in general, if you have arrays @arr1, @arr2, @arr3, etc., you can make an array of arrays like this:

my @AoA = ( \@arr1, \@arr2, \@arr3, ... );
If gate, router are functions returning lists, then you can do this:
my @AoA = ( [ gate('10.1.254.254') ], [ router('193.83.153.254') ], .. +. );
See perlreftut, perllol, and perlref.

the lowliest monk