while(<>){ @tmp = split; push @LoL, [ @tmp ]; } for $array_ref ( @LoL ) { print "\t [ @$array_ref ], \n"; }