Loan Tran wrote:
> 
> #!/usr/bin/perl -w
> @col_header = ('Sybase Server','Function','Type','Unix
> Machine','Location');
> my $num_col_header = @col_header  ;
> $td0    = join('<td> </td>',
> @col_header[0..($num_col_header -1)]);
> $td    = '<table><tr><td>'."$td0".'</td></tr>';
> print "$td";
> 
> # out put:
> 
> <table><tr><td>Sybase Server<td> </td>Function<td>
> </td>Type<td> </td>Unix Machine<td> </td>Locatio
> n</td></tr>
> 
> Please note that there are 2 unwanted <td> from the
> out put. One is next to Server and one is next to
> Machine. How can I get rid of them? Can my code be
> shortened?


$ perl -e'
use CGI
qw/:standard/;                                                          
@col_header = ("Sybase Server", "Function", "Type", "Unix Machine",
"Location");
print table( Tr( [ td( \@col_header ) ] ) );
'              
<TABLE><TR><TD>Sybase Server</TD> <TD>Function</TD> <TD>Type</TD>
<TD>Unix Machine</TD> <TD>Location</TD></TR></TABLE>


perldoc CGI



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to