#! /usr/bin/perl $what = "coa"; if($what =~ /comm?a/){ print "Matched"; }