Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
        }
    }
    print "You lost! Pattern was: $pattern\n";
    
  2. or download this
    my $right_place =()= "$pattern$guess"=~/(.)(?=...\1)/g;
    
  3. or download this
    $right_color += $pattern =~ s/([$guess])/$1/g;
    $right_color -= $right_place;