Re: Perl help needed.

by John Erjavec V <jev(at)pconline.com>

 Date:  Sat, 22 Jan 2000 19:02:30 -0600
 To:  "Grant Peel" <tracker(at)home.com>,
"HWG - Languages" <hwg-languages(at)hwg.org>
 In-Reply-To:  home
  todo: View Thread, Original
At 06:54 PM 1/22/00 -0500, Grant Peel wrote:
>#!/usr/bin/perl5
>...
># Generate an HTML file using print command..
>
>$PRINT =  "Content-type: text/html\n\n";
>{
>      $PRINT;
>      open (ADDUSER, ">>../" . $filename);
>      print qq~
>
><!doctype html public "-//w3c//dtd html 4.0 transitional//en">
>....
>~;
>close (ADDUSER);
>exit;
>}

Well, one problem I can see is that you are not actually doing anything 
with $PRINT.  You probably want to do a '$|++;' somewhere above, and then 
'print $PRINT' right after opening the file.  I would also probably use 
'q~~' rather than 'qq~~', so that if you have anything in the perforated 
text area that perl would normally treat as special, it won't.

-JEV
--
John Erjavec V ## sig(at)jevonline.com ## 
http://www.jevonline.com/jev/index.html
"I'll say it again for the logic impaired."  --Larry Wall

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA