laziness, impatience, and hubris | |
PerlMonks |
dumping a hashby herby1620 (Monk) |
on Aug 08, 2006 at 23:26 UTC ( [id://566281]=perlquestion: print w/replies, xml ) | Need Help?? |
herby1620 has asked for the wisdom of the Perl Monks concerning the following question:
Am I an idiot, or what?
I'm trying to dump a simple hash. I thought it would be easy, just call some nice routine that will output all the key/value pairs in the hash. So, I pick up my handy _Perl in a Nutshell_ book (quite nice actually) and they have a description of Data::Dumper. I look at "simple procedural interface" and enter:
Which gives a nice thing indicating that the argument is a hash (duh!). I'm basically a "printf" kind of debugger. It works quite well, and I've used this in Perl. This SHOULD be a simple task without TOO much trouble. Someone must know a SIMPLE solution that will print out the key/value pairs kinda like: this => "one", that => "two" Of course I could write a routine (a bother!) that will iterate thru the keys, and print the values, but HASN'T someone done this already, or haven't I looked at the right place. Argggggg!! The next lesson will be writing a "hello world" program :-)
Back to
Seekers of Perl Wisdom
|
|