State Date other stuff 1 03/03/2003 one bad mother of a storm... 5 03/05/2003 nothing to write home about... 8 02/08/2003 they said it could never happen here ... #### my @states; # array holding one hash per state while (<>) { my ($state_number,$date) = split; $states[$state_number]{$date} = undef; } # now to summarize: # for each state that had any tornados at all, # list number of tornado days: for ( 1 .. 50 ) { if ( defined $states[$_] ) { printf( "state_id %2d: %3d tornado days\n", $_, scalar keys %{$states[$_]} ); } }