in reply to Finding One String in Another

I don't know if this is a big win, but you can do
#Now we build our hashes foreach(split "",$letters) { $letter_hash{$_}++; } foreach(split "",$word) { $word_hash{$_}++; } while(my($key, $value)=each(%word_hash)) { # no need to update $letter_hash{$key} return 0 if $letter_hash{$key}<$value; } return 1;
This will work even if letters or words ends in a zero character, which would end your loop.
--
Mike