perl -e'$foo='babab'; $foo =~ /*aba*/' Quantifier follows nothing in regex; marked by <-- HERE in m/* <-- HERE aba*/ at -e line 1.