my @hexv; while () { chomp; my @vals = split ' ', $_; @hexv = (@hexv,@vals) } #### my @hexv; while () { push @hexv, split; } #### my @hexv = map split, ; #### my $endex = scalar @hexv - 1; #### my $endex = $#hexv; #### foreach my $index ( 0 .. $endex ){ last if $index == $endex; #### foreach my $index ( 0 .. $endex - 1 ){