in reply to Processing lines after a pattern in a while loop

.. in scalar context is a flipflop operator that does what you describe like this:
while (<DATA>) { # skip everything from line 1 to the #cardtype line unless (1../^#cardtype$/) { # we're past the junk } }
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.