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 ...
In reply to Re^2: parsing multiple lines
by GrandFather
in thread parsing multiple lines
by sm2004
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |