good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: do-until inside while loop controlby Paladin (Vicar) |
on Nov 24, 2015 at 00:34 UTC ( [id://1148455]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|