in reply to Remove the duplication in Hash values

Building on yesterdays question, you can use the same unique identifier for an array approach.
my %names=(one => [1,2,3], two => [4,5,6], deux => [4,5,6], three => [7,8,9] ); my %values; for (keys %names){ delete $names{$_} if $values{ join ( ',', @{$names{$_}} ) }++ +; } for (keys %names){ print "$_ => ", join (", ", @{$names{$_}} ), "\n"; }
print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."