We don't bite newbies here... much | |
PerlMonks |
table()'s with CGI.pmby mexnix (Pilgrim) |
on Jun 25, 2001 at 20:10 UTC ( [id://91324]=perlquestion: print w/replies, xml ) | Need Help?? |
mexnix has asked for the wisdom of the Perl Monks concerning the following question:
With the latest things I've been working on, I've been trying to get into the Perl (and CGI.pm) way of thinking. This is a problem that struck me today, I just wasn't sure what to do, but it may require changing my data structures. This comes from a script I decided to put together to keep a current status of all our web sites so that my department (1 programmer working in a graphics design studio) doesn't get ignored. The data comes in like this :
Now I want to take %sites and print it into table. My first thought was that I would iterate over %sites with foreach and print a <td> each time, but when I was reading the CGI.pm documention, table() was totally different than I thought. What I want to do is print a table that looks roughly like this:
Site Name | Site Address | Status | Comments $site | $sites{$site}->[0] | $sites{$site}->[1] | $sites{$site}->[2] Is this possible? Or does %sites need to change to @sites or a hash reference?
__________________________________________________
Back to
Seekers of Perl Wisdom
|
|