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]
> Subject: Re: Default variable for STDIN.
> 
> 
> Easiest way is to do
> 
> print "Hit Y to continue: [N]";
> $input = <STDIN>;
> 
> 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.
> 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to