Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I use perl to start an HTML

Status
Not open for further replies.

andycruce

Programmer
Jun 25, 2002
11
0
0
US
How do I use perl to start an HTML file. I know how to generate HTML within a perl program but what I am looking for is something like.

Entry HTML file with a submit button that executes perlprog.cgi
|
|
\/
perlprog.cgi does some entry stuff and causes stuff.html to be displayed
|
|
\/
stuff.html does the rest of the site stuff.

The whole idea is to have the Entry HTML file go into a directory protected with .htaccess. Then the perl program runs and stores some data about the user using $ENV. Once the data are stored - in a log file - the perl then causes the stuff.html to be loaded and exits. From there the site works as normal. I know I could put some html in the perlprog.cgi and basically ask the user to click on another button to proceed but I'd like the whole process to be automatic.

Seems like it should be simpele but I don't see how to do it.

Thanks

Andy Cruce
 
Your perl program will do some backend stuff, and then redirect to another file?


# ======== Perl program:
#!/path/to/perl

use CGI;
my $j = new CGI;

# Do the things you need to do, but
# NO output to the browser!

# Then when ready to 'redirect':

print $j->redirect("Stuff.html");

#done.
#==============================

Hope this is what you meant.

--jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top