in reply to Suggestions on how to make array of hashes with this...
If you can't count on the order (although your example was entirely ordered), then it's a bit harder, but still pretty straightforward.$_ = join "", @SORTME, "\n\n"; while (/(AMAFILE):\s+(.*)\n(STATUS):\s+(.*)\n(DATE CREATED):\s+(.*)/g) + { push @array, { $1, $2, $3, $4, $5, $6 }; }
-- Randal L. Schwartz, Perl hacker
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Suggestions on how to make array of hashes with this...
by snafu (Chaplain) on Sep 21, 2001 at 09:37 UTC |