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?

Reply via email to