$string = "alphabet is abc...\n"; $re = ReadREFromFile(); $re = 'm/abc/'; #for testing... print "match\n" if ($string =~ $re);