in reply to Re: MSIE Favorite Start Page
in thread MSIE Favorite Start Page
Yeah, that's more Perl-ish, but its also less straightforward. Why should I have to build up the entire table in memory before I can print it to the file?my @table; while( @linkURL ) { my $linkLeft = td( a( { -href => pop( @linkURL ) } pop( @linkName +) ) ); my $linkRight = @linkURL ? td( a( { -href => pop( @linkURL ) } pop +( @linkName ) ) ) : " "; push @table, TR( $linkLeft, $linkRight ); } print FILE table( {}, @table ) or die "Print Failed, $!, $^E\n\t ";
So I didn't use CGI. I did think about using CGI, I do know how to use CGI, and I made the decision that I didn't want or need CGI for this 10 minute project. Now, if I were runing a web server on my desktop and wanted this page generated on the fly (which would be cool) I would use CGI to generate the header() info for me. I would also use the start_html() and end_html() functions, but I still wouldn't use the table functions.
Thank you, by the way, for bringing up the subject. Too many people forget that CGI is just another tool in the tool box. Sometimes it isn't the right solution, sometimes its not the right tool.
PS: Thanks for the tip on <center> being deprecated. I did not know that. According to the w3c spec for HTML 4.01 I should have used <DIV align=center>.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: MSIE Favorite Start Page
by ichimunki (Priest) on Jan 13, 2001 at 04:34 UTC |