'\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.
In reply to Re^5: Search a hash for STDIN and report findings
by moritz
in thread Search a hash for STDIN and report findings
by trenchwar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |