Help for this page

Select Code to Download


  1. or download this
    while (<>) {
          if ($_ eq /yes/ or /y.*/) {
    ...
              exit;
          }
      }
    
  2. or download this
    my $ans = <STDIN>;
    print "\n$word1 $word2 $word3 $word4\n" if ($ans =~ /^y/);
    
  3. or download this
    print "\n$word1 $word2 $word3 $word4\n" if (($ans = <STDIN>) =~ /^y/);