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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is it possible to code perl script inside HTML?

Status
Not open for further replies.

rcsen

Programmer
Jan 11, 2001
51
0
0
US
Hi all,
COuld you suggest me whether it is possible to code perl scripts inside HTML? The file extension will be .html
Thanks.
RCSEN
 
Yes it is, have a look on download the current version of Perl and you'll find references to it in the documentation. Can't remember exactly how to get to it, and it's a home and I'm in the office, but it wasn't hard to find.
Mike
michael.j.lacey@ntlworld.com
 
If you want to get into some basic Perl, try PerlScript. Its just like JavaScript <script language=perlscript> but functions like perl.

Hope this helps,

-Vic vic cherubini
vikter@epicsoftware.com
====
Knows: Perl, HTML, JavScript, C/C++, PHP, Flash, Director
====
 
i think id you use apache with mod_perl you can embed perl code in html also. i think you just need to set it up for .phtml files adam@aauser.com
 
I don't have permission to install any modules. I tried using perlscript. But I don't know how to call an URL in perlscript function. Could you suggest me?
Thanks
RCSEN
 
<head>
<script language = perlscript>
sub callperl()
{
my $URL = REMOTE_ADDR('Some URL');
LWP::UserAgent:: redirect($URL);
}
</script>
</head>

<body onLoad=callperl();>

The perl integration was successful.
</body>

</html>

This is my sample code.
RCSEN
 
or:

<%@Language=PerlScript%>
<%
$Response->Redirect('url');
%>

this is asp, so, you'll have to use the asp extension.

the <script language=perlscript> is for client-side scripting... unless you have runat=Server in it as well. adam@aauser.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top