in reply to Re: Re: BOfH Random Excuse Generator
in thread BOfH Random Excuse Generator
For instance,
print "\n$word1 $word2 $word3 $word4\n" if (($ans = <STDIN>) =~ /^y/); could have been print "\n$word1 $word2 $word3 $word4\n" if (<STDIN> =~ /^y/i); or print "\n$word1 $word2 $word3 $word4\n" if (<STDIN> =~ /^[Yy]/);
Updated per chromatic's suggestion to allow for case insensitive matching.
|
---|