in reply to use of 'continue' block for while/until
-p uses it to print the output at the end of every loop.
>perl -MO=Deparse -pe1 LINE: while (defined($_ = <ARGV>)) { '???'; } continue { print $_; } -e syntax OK
Another example is C-style for loops.
for ($i=0; $i<10; ++$i) { foo }
can be written as
$i=0; while ($i<10) { foo } continue { ++$i }
|
|---|