given ($x) { when (/abc/) { ... } when (/def/) { ... } when (/ghi/) { ... } } #### if ($x =~ /abc/) { ... } elsif ($x =~ /def/) { ... } elsif ($x =~ /ghi/) { ... }