![]() |
|
Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Constructing HTML tables with CGI.pmby kabel (Chaplain) |
on Mar 28, 2003 at 07:28 UTC ( #246416=note: print w/replies, xml ) | Need Help?? |
you want Tr () to output your hash. so, each key/value pair inside the hash must be encapsulated inside a td () - the loop to use therefore is "map", not "for". for is only used for the sideeffects of the corresponding block that is applied to each of the elements of the list. especially the for does not return anything meaningful. the map takes a list, and returns a list - and that is what you want. you specify the transform of each element in the list in the map block. consider this:
HTH
In Section
Seekers of Perl Wisdom
|
|