in reply to Re: Large file data extraction
in thread Large file data extraction
{the rest of the code continues.} But it doesn't loop to the next record once it finishes extracting the first record? And I am not sure why? Thoughts? Thank you so much again. This is very helpful (and I am at wits end as is) :-) Also, someone mentioned that there is no input....I have the file on the command line such that <> refers to it. Is that not correct?my $allDocs = do { local $/ = "<hr>\r"; <>; }; my $rxExtractDoc = qr {(?xms) (<h4>Award\s\#(\d+)(.*?)<hr>) }; while ($allDocs =~ m{$rxExtractDoc}g ) { my %award = (); # award hash $award{'record'}= $1; $award{'A_awardno'}= $2; $award{'entireaward'}= $3; # $award{'entireaward'}=~ s/\n//g; $award{'entireaward'}=~ s/\t//g; $award{'entireaward'}=~ s/\r//g; if ($award{'entireaward'} =~ m{Dollars Obligated(.*?)\$([^<]+?)< +}gi){ $award{'B_dollob'} = $2};
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Large file data extraction
by ikegami (Patriarch) on Aug 12, 2008 at 03:51 UTC | |
by micwood (Acolyte) on Aug 12, 2008 at 05:59 UTC | |
by micwood (Acolyte) on Aug 12, 2008 at 05:17 UTC | |
|
Re^3: Large file data extraction
by peter (Sexton) on Aug 12, 2008 at 15:04 UTC |