Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Unable to create HASH type

by johngg (Canon)
on May 07, 2018 at 11:30 UTC ( #1214149=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1214149]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2018-11-13 03:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My code is most likely broken because:
















    Results (149 votes). Check out past polls.

    Notices?