I am looking for a function that can take a string produced by Data::TreeDumper and return a Perl hash.
Does anyone know if this already exists? If not, I will take a shot and upload it to CPAN.
To give some background on why I want this, I need to parse a log file produced by a Perl application (which I can not change), but some log messages take up multiple lines because they include a hash printed with TreeDumper.
As a result, quickly grepping for some information is very difficult. I want to write a Perl script that parses the log file and outputs one log message per line. I will probably use JSON to re encode the hash, but I would also be open to other suggestions.
If it matters, the logger has set the option $Data::TreeDumper::Displayaddress = 0;
Best,
Jim
In reply to TreeDumper Parser / Inverse? by jimpudar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |