#!/usr/bin/perl %hsh = ( "hoo of nottingham"=>"01/23/45","animal"=>"05/02/46","pops"=>"11/21/12","danclark"=>"11/21/12","Hugh"=>"01/23/99" ); @sorted_keys = map { $_->[0] } sort { $a->[3] <=> $b->[3] or # year $a->[1] <=> $b->[1] or # month $a->[2] <=> $b->[2] # day } map { [$_, split(/\//,$hsh{$_})] # (orig, mm, dd, yy) } keys %hsh; print map "date: $_\n", @sorted_keys; # Print each sorted key next to value - Dan Clark foreach (@sorted_keys) { print "key:$_ \t val:$hsh{$_} \n"; } ############################################################# # Debug stuff @poo = map { [$_, split (/\//,$hsh{$_})] } keys %hsh; foreach (@poo) { print "POO : ( @{$_}->[0]) @{$_}->[1] = @{$_}->[2] = @{$_}->[3] Val: \n"; } ##############################################################