in reply to a little REGEX help

If your data sample only reflects "clean" entries, how do "unclean" entries look like?

I think, for only separating the entries, a split can also do the job...

#... LINE: while ( my $line = <DATA> ) { chomp $line; # skip all lines which don't contain "EUR/USD" at the beginning next LINE if $line !~ m{^\s*EUR/USD}; # split $line at pattern '\s*,\s*' into at most 3 pieces # and ignore the first piece # for details, see: perldoc -f split my ( $value, $rest ) = ( split( m{\s*,\s*}, $line, 3 )[1,2]; # extract the timestamp from the third piece my $time = ( split m{ }, $rest, 2 )[0]; print "$name : $value : $time\n"; }

updated PS: your Regex has a typo: \s*,s\*

Update #2: added code comments