//input.txt 1.57163 ,17:29:57 Simple Dealin 1.57163 ,17:29:57 1.57163 ,17:29:57 1.57163 ,17:29:57 1.57163 ,17:29:57 1.57163 ,17:29:57 1.57163 ,17:29:57 1.571 ,17: 1.57172 ,17:30:08 1.57176 ,17:30:10 #### while () { unless (m{^(.*?)\s*,([\d:]+)}) { next; } chomp $_; ($quote,$time) = split(",", $_); // do my computations chop($quote);chop($quote);