in reply to Regular expression help: why does this not match?

The ? is a regex metacharacter. If you want to match it, match on "\?".
Otherwise, you should be checking for string equality using $a eq $b.
#!/usr/local/perl $a = "http://www.myurl.com/e.php?a"; $b = qr|http://www.myurl.com/e.php\?a|; if ($a =~ /$b/) { print "FOUND\n"; } else { print "NOT FOUND\n"; } $a = "http://www.myurl.com/e.php"; $b = "http://www.myurl.com/e.php"; if ($a =~ /$b/) { print "FOUND\n"; } else { print "NOT FOUND\n"; } $a = "http://www.myurl.com/e.php"; $b = "http://www.myurl.com/e.php"; if ($a eq /$b/) { print "FOUND\n"; } else { print "NOT FOUND\n"; }