Just to toss my experiences in here, my single CGI used print<<_ to quote my HTML, the thing I thought was odd is that if I put the Content-type line inside the block, it appeared on the screen. I had assumed that this is some sort of Apache setting, perhaps it looks for a .cgi extension and sets up the type? Or is it MSIE?
As for those annoying HTML tags, I like to sometimes make up my own tags, then convert them all with a global search-and-replace. In that vein, you can whip up a regex to add <br /> to the end of the pertinent lines, or at least most of them, just look for an end of line without a semicolon and that should get most if them. If this is off-topic, I apologize. -=GLA=- -----Original Message----- From: Bill Jones [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 04, 2001 10:46 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: CGI <br> On 10/4/01 10:20 AM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I'm not really clear on how PERL works when writing HTML. > > when writing to a console, you simply use \n to move to the next line > but using the same code in a browser I get everything on the same line. > > is there a way that when writing to HTML, the \n gets converted to <br> > or > do you have to explicitly print out every <br>? > > and one more question, here is a piece of my program > > > use Win32::ODBC; > > print "Content-type: text/html\n\n"; > print "<HTML>\n"; > print "<BODY BGCOLOR=#FFFFFF>\n"; > > $DSN = "WIP"; > #print "Opening database...\n"; > if (!($db = new Win32::ODBC($DSN))){ > print "Error connecting to $DSN\n"; > print "Error: " . Win32::ODBC::Error() . "\n"; > exit; > } Use HERE DOCS - print <<_HereIBe; Content-type: text/html <HTML> <HEAD> ... HereIBe Also - are you checking to see if there are security/file premissions errors or that the file is not already OPNE? HTH; -Sx- -- 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]