while(){ push @all, [ split '\s+', $_ ] } print "@$_\n" for @all __DATA__ 11 21 31 12 22 32 13 23 33