$ perl -wle '"abc" =~ m/^[a.c]+$/ && print "ja" ' $ $ perl -wle '"abc" =~ m/^[abc]+$/ && print "ja" ' ja $