Because the attributes always come after the primary id, little bookkeeping is required to populate a hash, or a database. It isn't clear to me how the subject enters the problem, so I left that out.my %rec; my $pid; while (<>) { $pid = $1 if /^Backup ID: (\d+)$/; $rec{$pid}{path} = $1 if /^Path: (\S+)$/; $rec{$pid}{size} = $1 if /^Size: (\d+)$/; }
-Mark
In reply to Re: Parsing a Pine mailbox
by kvale
in thread Parsing a Pine mailbox
by tdp05
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |