?? I must be drunk? Doesn't if ($r[0] =~ /^COMP/) { $r[0] = $r[1]; if ((not $r[0] =~ /HCOMP/) and (not $r[0] =~ /GCOMP/) and (not $r[0] =~ /CCOMP/)) { $r[0] = "COMP"; } } reduce to if ($r[0] =~ /^COMP/) { $r[0] = "COMP"; } ?? j