use strict; use warnings; while (my $line = ) { chomp; print "INPUT LINE: $line\n"; # Read all the times from the line and place into array my @times = ($line=~m/[-+0-9.E]+/g); # Print the values print $_*1000, "\n" for @times; } __DATA__ 2.83506E+03 2.83697E+03 2.83911E+03 2.84117E+03 2.84331E+03 2.84544E+03 2.84750E+03 2.84958E+03 2.85172E+03 2.85383E+03 2.85588E+03 2.85804E+03 2.86012E+03