in reply to Extracting Data from a second line

My solution is different again. No error checking etc. Assumes all data as given.
open(FH,"file"); while( <FH> ) { if (/red line/) { process(<FH>); } }
Note this will read the lines below other 'keys' but will just pass them by.

Not the most elegant or efficient but it does work.

Replies are listed 'Best First'.
Re^2: Extracting Data from a second line
by Not_a_Number (Prior) on Feb 16, 2006 at 21:00 UTC
    while( <FH> ) { if (/red line/) { process(<FH>); } }

    This doesn't work as required. Replace

        process(<FH>);

    with

        process(scalar <FH>);