in reply to Best way to "Skip" a set of operations
#!/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; }
|
|---|
| 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 |