$ perl -Mstrict -Mwarnings -e 'my $re = /[ /\\-]/' Unmatched [ in regex; marked by <-- HERE in m/[ <-- HERE / at -e line 1.