> I'd like to thank everybody who came up with suggestions. > One thing I > forgot to point out is that there are also people with > whitespace in their > *given* names, which seems to make things even more problematic
I've updated my solution to accommodate that: while (<DATA>) { my @cols = m/^(\d+) #id1 \s(\(\d+\)) #id2 \s([\w ]+), #lastnames \s([^\d]+) #first name \s([\d\.]+) #data1 \s([\d\.]+) #data2 \s([\d\.]+) #data3 \s([\d\.]+) #data4 \s(\w+) #country code \s([\d\.]+) #data5 /x; printf "%s\n", join "\t", @cols; } __DATA__ 1 (1) DAVENPORT, LINDSAY 3380.00 16 .00 49.00 USA .00 2 (2) CLIJSTERS, KIM 3206.00 17 .00 .00 BEL .00 28 (28) MOLIK, ALICIA 671.00 15 .00 195.00 AUS .00 29 (33) MEDINA GARRIGUES, ANABEL 660.75 27 30.00 10.00 ESP 2.00 30 (35) KOUKALOVA, KLARA 660.75 23 16.00 20.00 CZE 2.00 77 (84) MONTOYA, INIGO CONQUISTADOR 100.22 23 16.00 20.00 ESP 2.00 _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs