Keep It Simple, Stupid | |
PerlMonks |
Printing an Hashby anshumangoyal (Scribe) |
on Aug 01, 2012 at 14:26 UTC ( [id://984801]=perlquestion: print w/replies, xml ) | Need Help?? |
anshumangoyal has asked for the wisdom of the Perl Monks concerning the following question:
I have a hash which has around 20 Key Value Pairs. I want to print these values in a file and on screen in such a way that the indentation is not lost. I want to print it in mysql query output format. The Keys will be name of parameter and below it the value of the key has to be printed. I tried with sprintf but it's not a success. The keys length are different and so it he value length. What is the best possible solution?
Back to
Seekers of Perl Wisdom
|
|