in reply to assigning to a hash via split
You can use a hash-slice to assign a list of values to a list of keys directly. Your inner while loop becomes:
while (<IN>) { chomp; my %rec; @rec{@fields} = split /:/; $users{$rec{name}} = \%rec; } [download]