if ($status == C->CONST1) { print "1" } elsif ($status =~ /(?{ C->CONST2 })|(?{ C->CONST3 })/) { print "2 or 3" ; } else { print 'Something'; }