in reply to Re: What is wrong in this
in thread What is wrong in this
Alternations in regexen are a single pipe, not a double pipe. Your version has two null alternations, and will thus match the empty string, and since it isn't anchored, anything:
$ perl -le 'print "foo" if "zoombots" =~ m/baz||bar/' foo
|
|---|