my @list; for my $line (@inputs) { my @fields = split(/(PREFACE|ANALYSIS|...): /, $line); shift @fields; my $record = {}; while (@fields) { my ($tag, $content) = splice(@fields, 0, 2); $record->{$tag} = $content; } push(@list, $record); }
In reply to Re: Regex help - butchering text into paragraphs
by pc88mxer
in thread Regex help - butchering text into paragraphs
by throop
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |