in reply to Re: parsing multiple lines
in thread parsing multiple lines

Why a hash ref rather than a hash? Surely it is simpler and clearer to write:

my %record; while (<IN>) { if (/^(\d+).../) { # found beginning of new record process (\%record) if $record{id}; %record = (); # Flush old record $record{id} = $1; # populate parsed info from this line ...

Perl is environmentally friendly - it saves trees