use strict; use warnings; use Data::Dumper; my @ASAList; while () { chomp; push(@ASAList, split / /); } print Dumper(\@ASAList); __DATA__ 27 25 52 1 2 3