use strict; use warnings; my $i; for my $case (1..4) { eval { goto "_$case" } or $i = "Other"; next; _1: $i = "One" ; next; _2: $i = "Two" ; next; _3: $i = "Three"; next; } continue { print "$case is $i\n"; }