in reply to Best way to "Skip" a set of operations

If you are in a while loop, you can just call next. The part after JUMP HERE should then go to a continue block so it gets executed every time, even when you call next.
#!/usr/bin/perl use warnings; use strict; use feature qw{ say }; my $i = 1; while ($i <= 10) { say $i; if ($i % 2) { say 'Skipping an odd number.'; next } } continue { ++$i; }
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^2: Best way to "Skip" a set of operations
by LanX (Saint) on Jul 03, 2019 at 19:14 UTC
    Side note:

    > If you are in a while loop, you can call ...(loop control)

    No need for an explicit while loop, any nacked surrounding block is fine.

    main::(-e:1): 0 DB<1> print 1 ; { last; print 2 }; print 3 13 DB<2>

    See also perlsyn#Basic-BLOCKs

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice