use strict; use warnings; use Data::Dumper; my ($temp, @results) = ''; ### Fast forward past header while () { last if m/\s+$/; } ### While there are records remaining... while () { $temp .= $_; ### Process if end of record tag reached if (m/\s+$/) { my %hash; $temp =~ s/\n//g; $temp =~ s/.*//; $hash{$1} = $2 while $temp =~ /<(.*?)>([^<]*)\s/sg; push @results, \%hash; $temp = ''; } } print Dumper(\@results); __DATA__ Exported by jLog (c)2006 LA3HM, V 3.90.2.7 according to ADIF 2 jLog For jLog info: mailto:mail@jlog.org http://jlog.org/ Proposed ADIF2 Extensions may be included 20051029 213400 VC3O 20M SSB VHF 59 59 1 4 4 4 4 VC3 NA 14 0001 Y Y Y E 20060701 183206 VE6GG 20M SSB MWB 59 59 1 27 AB 2 4 RAC VE6 NA 14.16299 AB 1257 Y 2006-07-01 Y 2006-07-01 N7DQ