Just another Perl shrine | |
PerlMonks |
Re: What is the best way to dump data structures to logfiles?by jettero (Monsignor) |
on Mar 13, 2007 at 18:01 UTC ( [id://604633]=note: print w/replies, xml ) | Need Help?? |
I think Data::Dumper is fine for every day purposes. It's pretty fast. My guess is the object oriented interface would make things more log friendly. Also $Data::Dumper::Indent=0 to keep it all on one line. You might also look at JSON, which may have a way to do single line things, and if that (staying on one line I mean) isn't a concern you might even look at YAML::Syck. It's supposed to be pretty fast, since it uses a c library for ... something. -Paul
In Section
Seekers of Perl Wisdom
|
|