in reply to Re^2: help with user selected hash operations?
in thread help with user selected hash operations?

In addition to the other excellent advice you have received, I will offer a diagnostic tool which is as useful as it is simple: don't just say something's wrong, say in what way it is wrong. ie. instead of

print "Invalid choice, TRY AGAIN!\n";

do this:

print "Invalid choice ($choice), should be one of a, r, o, d or e. TRY + AGAIN!\n";

This will let you know either that your condition is badly written (as it was) or if $choice is not being correctly set.

For other handy tips, do peruse the Basic debugging checklist.