http://www.perlmonks.org?node_id=1081609


in reply to Split of text

Here is a little code segment to get you started:

while(<DATA>){ my $date; $date = $1 if s/(\d+\.\d+\.\d+)\s*//; my $ccy; $ccy = $1 if s/([a-z]+)\s*//i; print "Date=$date, Currency=$ccy, Rest=$_\n" if $date && $ccy; }

assuming you have your data in the DATA segment. Dealing with processing the remaing fields is left as an exercise. You might want to consider splitting on semicola...