my $data ="2008-Jan-01 00:00:00 UTC (GMT +0000) - Toll: channel = seven, ref = xxx.xxxxxx.xxx.xxxxx.xxxxxxx, tids = 123456789"; print "\n---->Variation 1 (Cumbersome coding to be explicit)\n\n"; # split just once, on " - " (space hyphen space) for the data given my ($datetime, $therest) = split /\s-\s/, $data; my ($toss1away,$channel,$therest2) = split /=\s(.*?),(.*)/, $therest; # capture anything between "= " and the next comma my ($toss2away,$ref,$tids_uncleaned) = split /=\s(.*?),/, $therest2; my ($toss3away,$tids) = split /=\s(.*)/, $tids_uncleaned; print "DT: " . $datetime . "\nChannel: " . $channel . "\nref: " . $ref . "\ntids: " . $tids . "\n"; print "\n---->Variation 2 (Merely splits the data withOUT removing unneeded descriptors)\n\n"; my ($datetime,$channel,$ref,$tids) = split /\s-\s|,\s/, $data; # split on , print "DT: " . $datetime . "\nChannel: " . $channel . "\nref: " . $ref . "\ntids: " . $tids . "\n"; print "\n---->Variation 3 (Provides a header, removes descriptors from data.\n\tCould easily be revised to push each set of multi-line data to an AoA.)\n\n"; my $header=<