Help for this page

Select Code to Download


  1. or download this
    my $x = "foobar";
    print "matches 1\n" if ($x =~ m/foo bar/x); # succeeds 
    print "matches 2\n" if ($x =~ m/foo bar/); # fails
    
  2. or download this
    my %hash;
    while (<file1>) {
    ...
        # line from file2 is not in file1
      }
    }