in reply to Parsing multiple rows of text and converting to columns
If you set $/="" then the <FILE> construct will read in paragraphs, ie blocks of lines separated by empty lines.
Within these paragraphs, you can extract your data with a regular expression. For example, /Findings\|(\d+)\|(.*)>\n(.*)/ would extract the record number, the item description and the value as $1, $2 and $3. You could store them in a hash like this $hash{$1}{$2} = $3 for further processing, sorting and printing.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Parsing multiple rows of text and converting to columns
by gingeremmie (Initiate) on Jun 25, 2013 at 09:47 UTC | |
by Anonymous Monk on Jun 25, 2013 at 10:05 UTC |
In Section
Seekers of Perl Wisdom