Where do I need to include that line?
will this work? printer.pl 1~ #!/usr/bin/perl 2~ 3~ print "Content-type: text/html\n\n"; 4~ $postfile = 'posts.fil'; 5~ open(INFO, "<$postfile" ); 6~ @PostLines = <INFO> ; 7~ close(INFO) ; 8~ print "<HTML><HEAD><TITLE>Post Tester</TITLE></HEAD>\n"; 9~ print "<body>\n"; 10~ foreach $line (@PostLines) 11~ { 12~ print " $line "; 13~ } 14~ print "</body></HTML>\n"; (I am going to guess that you are trying to access this through a web browser? If not then forgive me!) You need to include : print "Content-type: text/html\n\n"; before you attempt to print it out. Scott Lutz Pacific Online Support Phone: 604.638.6010 Fax: 604.638.6020 Toll Free: 1.877.503.9870 http://www.paconline.net -----Original Message----- From: Anthony LaBerge [mailto:[EMAIL PROTECTED]] Sent: February 13, 2002 6:54 AM To: [EMAIL PROTECTED] Subject: Will not Work on the Server. I'm having a little trouble getting this simple test file to run on a server. printer.pl 1~ #!/usr/bin/perl 2~ 3~ $postfile = 'posts.fil'; 4~ open(INFO, "<$postfile" ); 5~ @PostLines = <INFO> ; 6~ close(INFO) ; 7~ print "<HTML><HEAD><TITLE>Post Tester</TITLE></HEAD>\n"; 8~ print "<body>\n"; 9~ foreach $line (@PostLines) 10~ { 11~ print " $line "; 12~ } 13~ print "</body></HTML>\n"; and the posts.fil 1~ This is a test document. I'm just testing, 2~ and i'll even throw in a " oooo. 3~ lets see if that works. When I run it through the comand line (typing 'printer.pl') it puts out: 1~ <HTML><HEAD><TITLE>Post Tester</TITLE></HEAD> 2~ <body> 3~ This is a test document. I'm just testing, 4~ and i'll even throw in a " oooo. 6~ lets see if that works. 7~ </body></HTML> When I put it on the server (in ascii mode) it does not work, and gives me an error, I made sure the command line is right, and even added the - - like the error asks, but it does not work either way. What's wrong? here's a link to the file as it is on the server. http://www.labant.net/printer.pl -- 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]