
mhx
Enthusiast
Oct 23, 2001, 5:47 AM
Post #2 of 4
(3398 views)
|
Either use eq:
#!/bin/perl -w $b='Universal Resource Locator, I think ????'; if ($b eq $b) { print "Condition True"; } else { print "Condition False"; } or escape all metacharacters:
#!/bin/perl -w $b='Universal Resource Locator, I think ????'; if ($b =~ /\Q$b\E/) { print "Condition True"; } else { print "Condition False"; } However, comparing $b with $b seems rather useless to me, but I assume here that you're about to do something that makes more sense... -- Marcus
s$$ab21b8d15c3d97bd6317286d$;$"=547269736;split'i',join$,,map{chr(($*+= ($">>=1)&1?-hex:hex)+0140)}/./g;$"=chr$";s;.;\u$&;for@_[0,2];print"@_,"
|