The best way would be:
IF (YOUR Pattern)  or (MY Pattern) or die "Cannot ..."

Would it be OK?