So, if I type one at the prompt it should return with uno.%hash = (one => 'uno', two => 'dos', three => 'tres'); $input = <STDIN>; chomp $input; if ($input = (keys %hash)) { print the value that matches the key of %hash; }
In reply to the if statement by kwn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |