It works by returning true once the first condition is met (where the constant 1 here is implicitly compared to the current input line number) and continues to return true until the second condition is met. See perldoc perlop for more information.while (<DATA>) { # skip everything from line 1 to the #cardtype line unless (1../^#cardtype$/) { # we're past the junk } }
In reply to Re: Processing lines after a pattern in a while loop
by ysth
in thread Processing lines after a pattern in a while loop
by NovMonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |