in reply to Hash of hashes syntax
or as a Array of hashes:my %hash_of_hashes; while (<UNITFILES>) { my @unitfiles_field = split /,/; #this is just an autogen number my $record_no = $unitfiles_field[0]; $hash_of_hashes{$record_no} = { lastname => $unitfiles_field[1], firstname => $unitfiles_field[2], DOB => $unitfiles_field[7], funding => $unitfiles_field[18], URNo => $unitfiles_field[15], Photo_permission => $unitfiles_field[14], }; } #end while
my @Array_of_Hashes; while (<UNITFILES>) { #this is just an autogen number my @unitfiles_field = split /,/; push @Array_of_Hashes, { record_number => $unitfiles_field[0], lastname => $unitfiles_field[1], firstname => $unitfiles_field[2], DOB => $unitfiles_field[7], funding => $unitfiles_field[18], URNo => $unitfiles_field[15], Photo_permission => $unitfiles_field[14], }; } #end while
hope this helps
-enlil
|
|---|