is their a perl module that can help print out an arbitrarily complex
variable either on the command line, or better yet, in a nicely
formatted n-deep table in html? the variable could be anything as
simple as an array, or as complex as an AoHoAoAoHoH.... you get the
picture... could be n-deep.
from perldsc I see that
"DEBUGGING
Before version 5.002, the standard Perl debugger didn't do
a very nice job of printing out complex data structures.
With 5.002 or above, the debugger includes several new
features, including command line editing as well as the
`x' command to dump out complex data structures. For
example, given the assignment to $AoA above, here's the
debugger output:
DB<1> x $AoA
$AoA = ARRAY(0x13b5a0)
0 ARRAY(0x1f0a24)
0 'fred'
1 'barney'
2 'pebbles'
3 'bambam'
4 'dino'
"
so, the debugger has this capability, but what about html? I thought I
would write something to do this (could search.cpan please be powered
by google or askjeeves?) but I couldn't even figure out how to
recognize if a variable were an array or a hash... wish there were an
isarray() or ishash() function.
of course, knowing perl, one of you gurus is probably going to come
back with a jaw droppingly simple solution, but right now I am stumped.