#!/usr/bin/perl use strict; use warnings; use 5.014; sub f { my $arg = shift; if ($arg == 0) { label: say 'here'; } elsif ($arg == 1) { # don't execute a branch with 'label:' } else { goto label } } f($_) for 0..2; __END__ here here