$ perl -wle ' q~hello~ =~ m/*ello/ and print "yeah";' Quantifier follows nothing in regex; marked by <-- HERE in m/* <-- HERE ello/ at -e line 1. $ perl -wle ' q~hello~ =~ m/.*ello/ and print "yeah";' yeah