It works perfectly. Thanks mucho.

--- Kirby_Sarah <[EMAIL PROTECTED]> wrote:
> I didn't test it, but this should work, right?
> 
> -----Original Message-----
> From: loan tran [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 12, 2002 4:02 PM
> To: [EMAIL PROTECTED]
> Subject: Can my code be shortened?
> 
> 
> #!/usr/bin/perl -w
> 
> @col_header = ('Sybase
> Server','Function','Type','Unix
> Machine','Location');
> 
> foreach $headIt (@col_header) {
>       $headIt =~ s!(.*)!\n\t<td>$1</td>!;
> }
> 
> print "<table>@col_header\n</table>";
> 
> # out put:
> 
> <table>
> <tr>
>       <td>Sybase Server<td> 
>       </td>Function<td>
>       </td>Type<td> 
>       </td>Unix Machine<td> 
>       </td>Location</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?
> 
> Thanks in advance for your help.
> 
> Loan
> 
> 
> 
> 
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! News - Today's headlines
> http://news.yahoo.com
> 
> -- 
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
> -- 
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com

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

Reply via email to