if ($response == 200) { # } elsif ($response == 500) { next; # or last, or whatever. } else { # default }