my $redid = 0; my @list = (1..5); xyz : for (@list) { print; redo if $_ == 3 && ! $redid++; } # Output: 123345