CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Trying to embed a perl application into html

 



Robert2000
Deleted

Jan 25, 2001, 10:50 AM

Post #1 of 4 (303 views)
Trying to embed a perl application into html Can't Post

Need help!

I am trying to embedd a perl script into a section of my html code. In other words when the html is launched the perl script automatically launches... You can this in the following URL's below:

I am trying to embed an .pl file into another html file

mail index file: URL: http://www.evirtualworld.com/menu3.htm

file that needs to go into the above file

URL: http://www.evirtualworld.com/cgi-bin/abcnews.pl

How do I get the .pl application (actually the html output) to appear in the menu3.htm file?

Do you know how to do this? (email address below:)

Robert
Robert_J_Maagdenberg@seagate.com



pu_nk
journeyman

Jan 25, 2001, 12:11 PM

Post #2 of 4 (301 views)
Re: Trying to embed a perl application into html [In reply to] Can't Post

Hey ROb,

Well the only way i can think of to do this is with SSI.

Here is an SSI tag that will load a perl script via .shtml or .html (if your server supports it)

<!--#exec cgi="cgi-bin/file.pl"-->


Use the Virtual Path not the server Path in the tag.
Hope this helps
Drew



abockover
Deleted

Jan 25, 2001, 10:13 PM

Post #3 of 4 (295 views)
Re: Trying to embed a perl application into html [In reply to] Can't Post

You might want to consider using "Perl Server Pages", or what I use :: ePerl. This allows you to embed perl right into your html (ePerl example):

<html>
<head>
<title>ePerl Example</title>
</head>
<body>
<h1><? print "ePerl Example"; !>
</body>
</html>

I cannot remember the exact web address to ePerl, so:

serverpages.com -> Perl Server Pages -> ePerl

It is worth it... you may have a problem getting a hosting company to install it though, so it is best when you have your own physical server (unix based only)

-Aaron



Cure
User

Jan 27, 2001, 9:39 AM

Post #4 of 4 (286 views)
Re: Trying to embed a perl application into html [In reply to] Can't Post

you could use a SSI(Server Side Include) Tag, which allow us to embed special directives in our HTML documents to execute other programs or insert various pieces of data such as environment variables and file statistics. While SSI has technically nothing to do with CGI, it is important tool for incorporating dynamic information, as well as output from CGI programs, into otherwise static documents.
OR
you could use the HTML::Embperl module, often referred to simply as Embperl, takes a different approach; it parses HTML files for Perl code, allowing you to shift your code into yout HTML documents. This approach is similar to Java Server Pages or Microsoft's ASP technology that moves programming languages into documents.


Cure



(This post was edited by Cure on Jan 27, 2001, 8:40 AM)

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives