in reply to Re^2: perl command line prompts
in thread perl command line prompts
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/) {
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: perl command line prompts
by Transient (Hermit) on May 16, 2005 at 20:28 UTC |