http://www.perlmonks.org?node_id=1214149


in reply to Unable to create HASH type

Further to what roboticus said, you can use Data::Dumper->Dump() or its faster C-coded equivalent ->Dumpxs(), which are not exported by default, to obtain a perhaps clearer output. This is more useful if inspecting multiple variables in one go.

johngg@abouriou ~/perl/Monks $ perl -Mstrict -Mwarnings -MData::Dumper + -E ' my %hash = ( Name => q{Fred}, Age => 28, Sex => q{M} ); print Data::Dumper->Dumpxs( [ \ %hash ], [ qw{ *hash } ] );' %hash = ( 'Sex' => 'M', 'Age' => 28, 'Name' => 'Fred' );

I hope this is of interest.

Cheers,

JohnGG