in reply to Testing for a string value within an array
my %hash; for (qw(first second first third second fourth)) { exists $hash{$_} or $hash{$_} = keys %hash; # Put stuff in like t +his } print "$_\n" for sort {$hash{$a} <=> $hash{$b}} keys %hash; # Get stuf +f out like this
|
|---|