in reply to table()'s with CGI.pm

You've got a couple of problems.
  1. split takes a regex, so you have to quote the pipe.
  2. You're assigning a list to a scalar in the hash, so you're just storing the number of elements. If you want to store the entire list, you have to say $sites{$site} = [@values];

Now, as to printing the table. I'm assuming you're printing in the order that they come in. Here's how I like to do this kind of thing:

my @rows; open (INFILE, "<sites.txt"); my @headings = ( "Site Name", "Site Address", "Status", "Comments" ); push( @rows, th( \@headings ) ); while (<INFILE>) { my @fields = split /\|/; push( @rows, td( \@fields ) ); } # while close (INFILE); print table( TR( \@rows ) ); # NOTE: It's TR, not tr, so it doesn't get confused with tr///

xoxo,
Andy
--
I was dreaming when I wrote this, so sue me if I go too fast.