in reply to Re^5: How to capture the "isn't numeric" warning?
in thread How to capture the "isn't numeric" warning?

> for loop that only has one iteration.

Side note: Actually that's pretty much how bare blocks are implemented

perlsyn#Basic-BLOCKs

> A BLOCK by itself (labeled or not) is semantically equivalent to a loop that executes once. Thus you can use any of the loop control statements in it to leave or restart the block

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

Replies are listed 'Best First'.
Re^7: How to capture the "isn't numeric" warning?
by choroba (Cardinal) on Jun 16, 2019 at 12:45 UTC
    With the difference that some forms of the for loop also set $_ for you...
    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
      Yeah that's probably why it's normally compared to a one time while loop.

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