in reply to How to Print Return Data from Subroutine

The key to understanding what manner of reply you want is to know why you want to print the contents of the hash. If you simply want debugging output then the Dumper solution is the best answer. If however you want to use the printed hash contents as report output or in UI then you need either to know what the structure of the data is and handle it explicitly, or you need to parse the data in a similar fashion to Dumper.

There are two keys to Dumper type processing: recursion and ref. There is also a nasty gotcha: if there are circular references in the structure things will go pear shaped very fast!


Perl reduces RSI - it saves typing
  • Comment on Re: How to Print Return Data from Subroutine

Replies are listed 'Best First'.
Re^2: How to Print Return Data from Subroutine
by Anonymous Monk on Aug 24, 2008 at 19:14 UTC
    Thank you so much for helping me out, Monks!