raiten has asked for the wisdom of the Perl Monks concerning the following question:
Hello fellow monkers,
I'm trying to solve a simple problem: grep some multiple bigs files having different separator pattern with the same matching rule and output the corresponding block (not only the line). Some sort of grepmail but for any kind of text file.
To be more explicit, the input files could contained multiple blocks like:
case 1:
case 2:header1=val1 header2=val2 data
header1: val1 header2: val2 data
in case 3, like or not previous ones but with a separator line like '^-=+$'
matching rules need to be customized each time. input files could be hundrer with size in Gigabytes. performance needs to be acceptable :)
For now, except manual parsing, the only relevant module that I found is Parse::File::Metadata (1). Has anyone some hints of modules or else to manage this ?
thanks a lot.
Cheers
(1) http://search.cpan.org/~jkeenan/Parse-File-Metadata-0.04/lib/Parse/File/Metadata.pm
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: parse file per customized separator / block / metadata
by Utilitarian (Vicar) on Mar 06, 2010 at 17:03 UTC | |
|
Re: parse file per customized separator / block / metadata
by almut (Canon) on Mar 06, 2010 at 16:43 UTC | |
|
Re: parse file per customized separator / block / metadata
by repellent (Priest) on Mar 06, 2010 at 21:51 UTC | |
by raiten (Acolyte) on Mar 07, 2010 at 12:12 UTC | |
by repellent (Priest) on Mar 07, 2010 at 20:34 UTC | |
by raiten (Acolyte) on Mar 28, 2010 at 14:27 UTC | |
by raiten (Acolyte) on Mar 25, 2010 at 22:02 UTC | |
by repellent (Priest) on Mar 26, 2010 at 05:34 UTC |