In order to make things even more complicated I recommend to replace $hash{ $1 } with
$hash{ $1 } // $1
which means if $1 is not found in your hash, then replace your word with itself, ie leave it unchanged.
In reply to Re^3: using hashes
by hdb
in thread iterating hash keys?
by R56
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |