in reply to Parsing a Pine mailbox
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Parsing a Pine mailbox
by tdp05 (Acolyte) on May 06, 2004 at 18:00 UTC |