in reply to Re: Hash to HTML display
in thread Hash to HTML display

Using CGI.pm and not using ul() and li()? Here is a version that does, and i will admit that i peeked and am using merlyn's form for the recursive subroutine. Temptation--
use CGI qw(ul li); use CGI::Pretty; sub hash2html { my $r = shift; return '' unless ref $r eq 'HASH'; return ul(li[map {$_.hash2html($r->{$_})} sort keys %$r]); }

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)