$ perl -e 'my $re = "(broken"; "hallo" =~ /$re/;' Unmatched ( in regex; marked by <-- HERE in m/( <-- HERE broken/ at -e line 1.