Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Perl's feature to determine, in current point of loop, that this is the last one?

by syphilis (Archbishop)
on Jan 23, 2022 at 04:51 UTC ( #11140738=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -le 'for(1..10){print $_; last if $_ == 5}'
    1
    ...
    3
    4
    5
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11140738]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2022-06-30 10:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My most frequent journeys are powered by:









    Results (97 votes). Check out past polls.

    Notices?