If ($again =~ m/^y$/i) If $agian matches y at the begging and end. /i setting it to ignore case. I think that's what you where going for.
^match at begging of string $match at end of string. Paul > -----Original Message----- > From: Andrew F. [mailto:[EMAIL PROTECTED]] > Sent: Thursday, December 05, 2002 10:40 AM > To: [EMAIL PROTECTED] > Subject: trouble with case-sensitivity > > > I wrote a simple program, and I decided to put a piece at > the end which would allow the user to start the program over. > I did it like this: > > print "\n\n" . 'Do you want to do another comparison (Y > or N)?' . "\n"; > $again = <STDIN>; > if ($again == /'y'/i) {; > goto compare; > }; > > But I am having trouble getting it to use only 'y', and > not every input containing it. I had thought that using == > instead of =~ would work but it didn't. the string equality > (eq) didn't work either. Any suggestions? > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]