Hi Jian,
Sun, Jian wrote on 10.08.2004:
>Dear all;
> Could anybody help me to figure out How to display a Text file using the web
>browser in a CGI program?
>
>Thanks in advance
>Jian
>
Try this:
#!/usr/bin/perl -wT
use strict;
use CGI;
my $q = new CGI;
print $q->header(-type=>'text/html');
open (FILE, "filename_goes_here");
while (<FILE>) {
print $_, "<br>";
}
As before, you are encouraged to get Learning Perl, Programming Perl and CGI
Programming with Perl from O'Reilly.
- Jan
--
There are 10 kinds of people: those who understand binary, and those who don't
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>