or (maybe better)if ($answer eq "y") { #this is a string comparison. == is for numbers +only
The latter will also work if the user types "yes", "yup", etc.if ($answer =~ /^y/) {
In reply to Re^3: perl command line prompts
by holli
in thread perl command line prompts
by pccode
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |