in reply to Re: Re: BOfH Random Excuse Generator
in thread BOfH Random Excuse Generator
Don't worry about it. I ++'d your fine node, and so did a
lot of other people. You posted working code that used
-w & strict so, you are by definition a Righteous Dude.
Everything can be improved, including
what I posted.
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.
|
---|
In Section
Cool Uses for Perl