if ($data !~~ m/[E-R]\d\d\d/) {print "Error: $data\n"} else {print "No Error: $data\n"}