|There's more than one way to do things|
parse file per customized separator / block / metadataby raiten (Acolyte)
|on Mar 06, 2010 at 16:04 UTC||Need Help??|
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:
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.