in reply to Re^3: Regex help needed
in thread Regex help needed

your example
my $pattern = "foo|bar"; say "Match" if $str =~ $pattern;
is very convincing. - Sorry about that.