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.
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
----- Original Message -----
From: "Daniel Falkenberg" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 20, 2001 5:07 PM
Subject: Default variable for STDIN.
> Hello All,
>
> Just a quick question.
>
> Just wondering how I would go about allowing a user to enter with STDIN
> either a Y or a N, but have the default variable of N if the user just
> hits enter.
>
> So far I have...
>
> print "Hit Y to continue: [N]";
> $input = <STDIN>;
>
> hmm.. something like that.
>
> Kind Regards,
>
> Dan
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]