in reply to Re: use of eval and Data::Dumper
in thread use of eval and Data::Dumper
(Update: D'oh, I missed that "Terse" had already been mentioned above.)
To the OP, not moritz: I don't recommend Data::Dumper. YAML or Storable (or even JSON if it fits with what you're doing; JSON::XS is--last I checked--the fastest serializer in Perldom) are preferable. I'm just adding that you can get Data::Dumper to emit raw data (no variable at all so you can skip the no strict) this way-
use Data::Dumper; $Data::Dumper::Terse = 1; # No VARs. $Data::Dumper::Indent = 1; # Less indenting. my %what = ( foo => [ 1 .. 3 ], wacka => 1 ); print Dumper \%what; __END__ { 'wacka' => 1, 'foo' => [ 1, 2, 3 ] }
|
|---|