--- bc <[EMAIL PROTECTED]> wrote:
> how, in perl/cgi, or, what is a popular way of connecting to, and
> displaying, a csv file's contents to a browser, in table form?
Er.
Okay, um....
CSV as in Comma Seperated Values?
...start the page, print the table headers, make sure the file is open,
then
while(<CSV>) { # read a line
s/^/<TR><TD>/; # start the table row and first cell
s{,}{</TD><TD>}g; # seperate fields into cells
s{$}</TD></TR>}; # close the last cell and the row
print "$_\n"; # I like to add the newline
}
then print the table closing lines, etc.
That's kinda clumsy, but doesn't require anything too fancy.
You could also do a split/join if you prefer, but you'd still have to
handle the start and end of each line.
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]