http://www.perlmonks.org?node_id=809451


in reply to Data Structure Question

Try this.
#!/usr/bin/perl use strict; use Data::Dumper; my %record; while (<DATA>) { next if ( /^Employee/ ); my ($employee, $form, $date) = split( /\s+/ ); $record{$employee}->{$form} = $date; } print Dumper \%record; __DATA__ Employee Form Date 10001 10 20090101 10002 10 20080515 10003 10 20090323 10001 20 20090412 10002 20 20090711