Pathologically Eclectic Rubbish Lister | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I don't have an answer, but I have part of an answer - hash keys are not ordered and the order changes each time the script is run. Another observation is that characters in the target word that are not in the letter frequency hash cause uninitialized value warnings (but you'd have noticed those so I'm guessing it's not that). I strongly recommend you post a complete runable example that demonstrates the problem. It may be that you find the issue along the way - that's not a bad thing (see I know what I mean. Why don't you?). I agree with the others who have suggested loop variable should be named. The line $seen{$_}++ for (split //,lc $_); uses the default variable in two different roles. Are you trying to deliberately make your code obscure, or are you just "saving time" (see my current sig). If you need to revisit the code even once you have lost all the time you saved and more by not using named variables.
Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond
In reply to Re: Next from inner loop only works "most of the time"
by GrandFather
|
|