Gossamer Forum
Home : General : Perl Programming :

kinda advanced question

Quote Reply
kinda advanced question
hey,

I have a small site which is a community/portal on france.
for the past 6 months I have be adding the weather to the front page by grabing it using cgi and adding it to a txt file then calling that up by javascript. which is all a bit messy and java tends to knock down my web search position.

so my question is, is there a way to get the cgi to take in a template file say index.txt with #weather# where I want my weather to be and out put index.shtml with the weather place in the correct place on the page

the code i use to make my txt file is

open (ADDUSER,">$out") &open_error($out);
print ADDUSER $line;
close (ADDUSER);

is it possible to have this done

thanks in advance

Davidd sargent

Quote Reply
Re: kinda advanced question In reply to
grab the HTML::Template module and read the docs on it. it might be just what you are looking for.
you can separate your perl from your html with clean code and fast results.

-g


s/(\d{2})/chr($1)/ge + print if $_ = '8284703280698276687967';