use feature qw(say switch); for my $data (@ARGV) { given($data) { when (1) { say 'one'; goto two; } when (2) { two: say 'two' ; } default { say 'something else'; } } }