in reply to Data::Dumper in reference to Hashes
Data::Dumper (and the similar Data::Dump::Streamer) are used to look at the contents of variables - generally for diagnostic purposes. They can also be used to serialise a data structure so that it can be persisted to disk (saved and restored later). Data::Dump::Streamer does a better job of handling edge cases than Data::Dumper. Consider:
use strict; use warnings; use Data::Dumper; use Data::Dump::Streamer; my %hash = ( this => ['one', 2, 3.1], that => undef, ); print Dumper (\%hash); Dump (\%hash);
Prints:
$VAR1 = { 'that' => undef, 'this' => [ 'one', 2, '3.1' ] }; $HASH1 = { that => undef, this => [ 'one', 2, 3.1 ] };
|
|---|