Operating System - Linux
1753346 Members
5109 Online
108792 Solutions
New Discussion юеВ

Re: perl to create html...

 
SOLVED
Go to solution
John Kittel
Trusted Contributor

perl to create html...

I want to write a perl program to analize some files which change from time to time, and create a web page showing the results. I have a little experience using the perl CGI module for CGI programs, but this application doesn't need to be a CGI program, as it is not to be invoked by a web browser. Do I use the perl CGI module anyway, or just code the html generation with my own raw perl print statements, or is there something else ( some other perl module) ?

- John
3 REPLIES 3
Alex Lavrov.
Honored Contributor
Solution

Re: perl to create html...

If it's not executed by the web server, just write a perl program that generates html output.

Alex.
I don't give a damn for a man that can only spell a word one way. (M. Twain)
Muthukumar_5
Honored Contributor

Re: perl to create html...

Your requirement will not need CGI modules and all. You can simply check time stamp informations of file and generate related HTML Tags with print "content".

#!/usr/contrib/bin/perl
open FD,">/tmp/test.html" || die "Problem: $!";
print FD "TestText\n";

Execute this. It will geneate a file called /tmp/test.html.

hth.
Easy to suggest when don't know about the problem!
John Kittel
Trusted Contributor

Re: perl to create html...

Thanks.

- John