Help for this page

Select Code to Download


  1. or download this
    my @blacklist = ('evil', 'bad', 'wrong');
    my $a = "this string contains no blacklisted tokens";
    my $b = "this string is evil and wrong";
    ...
    else {
        print "Failure with b\n";
    }
    
  2. or download this
    my $regex = '.(?!evil)';
    
    if ("this is so evil" =~ /($regex)/) {
        print "yay: $1\n";
    }