in reply to Re^4: Search a hash for STDIN and report findings
in thread Search a hash for STDIN and report findings

We're both idiots, toolic ;-) (no offense meant).

'\n' would only be the case if the user entered a literal backslash followed by an n. Not very likely to be intended. Since $ending is already chomped there's no need for a newline check at all.

if ($ending eq 'done') is just fine, I think.

Replies are listed 'Best First'.
Re^6: Search a hash for STDIN and report findings
by trenchwar (Beadle) on Feb 07, 2008 at 21:35 UTC
    When taking out the \n the while loop keeps well...looping until 'done' is entered. Keeping it in ends the loop with a carriage return or the input.