perlquestion
fseng
Hi guys,
I'm just starting learning Perl. Here is my Q.<br>
I want to write a program to read in the following fixed width data file into a data structure of a real array of hashes, the data file for example called "clients" is like following:<br>
<code>
Surname L20, First Name L20, Town L20
--------------------------------------------------
Chaplin Charlie Basel
Estevez Emilio Santa Manica
Sarte Jean Paul Montmarte
Rikard Frank Amsterdam
Rodin Paul Montmarte
</code>
How should I do this?I want to read them in and sorted them in to associated hash where you can find who lives in diff towns or where Chaplin lives etc. I only came up with this so far:
<code>
open (CL, "clients");
my $list;
while (<CL>){
chomp;
print "$list\n";
}
</code>
Please help, it's urgent too....