Help for this page

Select Code to Download


  1. or download this
    if ($guess eq $correct[$i]) { # if guess is correct, reply
            print "You Rock!\n";
    ...
        } else {    
            print "You Suck!\n";  # if incorrect, reply and save answer to
    + be calculated 
            @incorrect = (@incorrect, $guess);
    
  2. or download this
    my @questions = ("Name the definitive rock band.." , "What is their be
    +st song?" , "What is their best album?");
    my @correct = ("The Rolling Stones" , "Moonlight Mile" , "Sticky Finge
    +rs");
    ...
    my @incorrect;
    my $i = 0;
    my $guess;
    
  3. or download this
    } elsif ($i < 2) {
            $i = $i + 1;