Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: do-until inside while loop control

by Paladin (Vicar)
on Nov 24, 2015 at 00:34 UTC ( #1148455=note: print w/replies, xml ) Need Help??


in reply to do-until inside while loop control

Check out the redo command, which allows you to go back to the top of a loop without re-evaluating the conditional (in your case, without reading another line in while (<data_file>)) so $_ will still contain the line with regex2 in it.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2023-09-24 10:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?