Just check like:
chomp($input = ); # get input and remove the c/r
$input = uc($input);
if ( $input eq '' or $input eq 'N') {
# nothing entered, so becomes your N
# put what you want when default is entered
}
Wags ;)
-Original Message--
Easiest way is to do
print "Hit Y to continue: [N]";
$input = ;
if ($input =~ /y/i) {print "this way anything but Y or y will get
ignored\n";}
Also, if you just want Y and them to not have to hit ENTER, too, try using
getc.
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
---
Rather, use:
if ($input =~ /^y$/i)
unless you want "yellow" and "okay" to work too.
> -Original Message-
> From: Agustin Rivera [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 20, 2001 5:16 PM
> To: Daniel Falkenberg; [EMAIL PROTECTED]