PerlScript |
PerlScript is an ActiveX scripting engine that allows you to use Perl with any ActiveX scripting
host. At this time, ActiveX scripting hosts include: When you launch the ActivePerl installer, PerlScript is one of the components you
can optionally install. You must install, or have previously installed, ActivePerl to use
PerlScript.
PerlScript in IE 4.0 and higher can be enabled/disabled by zones
Values
Values
Case sensitive lookup of event names may be being performed. Event name lookup can be made case
insensitive by adding key
Microsoft advertises Windows Scripting Host, or WSH for short, as being "a
language-independent scripting host for 32-bit Windows operating system platforms". WSH offers
a lot to VBScript and JScript developers for whom console type programs have been traditionally
difficult. For Perl Developers, however, the same functionality can be found with a Perl module or
extension.
More information on Windows Scripting Host can be found on the Microsoft Web Site at:
What is PerlScript?
What do I need to run PerlScript?
How do I install PerlScript?
How can I configure PerlScript security?
HKEY_LOCAL_MACHINE\SOFTWARE\ActiveState\PerlSE\1.0
REG_DWORD: EnabledZones = 0x0010 (default)
IE3 is more limited; it is an all or nothing affair. For IE3 the only values recognized are
Why aren't my event handlers called?
HKEY_LOCAL_MACHINE\SOFTWARE\ActiveState\PerlSE\1.0
REG_DWORD: NoCaseCompare = 1 (default)
What is Windows Scripting Host?
Active Server Pages, or ASP for short, generate HTML on your Web server and send it to the
browser. ActivePerl and PerlScript are required on your server but they are not
required on the clients.
To identify server-side Perl code to the server, you must do one of the following:
use the or
wrap your code in The example below uses the
Another option is enclosing anything that you want to be displayed as HTML as follows:
This will display the value of the variable Client-Side PerlScript has Perl embedded within your HTML documents. All PerlScript code must be
contained within Client-side PerlScript has the added requirement that both ActivePerl and PerlScript be installed
on each computer will will be loading PerlScript pages.
Client-side Perlscript should only be used if you can control the ocnfiguration of the computers
on which it will be run. If your goal is build an application which will be used by a large number
users, Server-side PerlScript is considerably more practical.
To display something to the browser, use the The sample below is another Hello World variation, but this time using client-side PerlScript:
Here's a short list of PerlScript FAQs available on the net:
Can I write Active Server Pages with PerlScript?
<SCRIPT>
tag
<%
and %>
<SCRIPT>
tag.
To do the same by wraping your code in <%@ LANGUAGE = PerlScript %>
<HTML>
<HEAD>
<TITLE>PerlScript Hello World!</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<H1>PerlScript Hello world!</H1>
<P>
<SCRIPT LANGUAGE="PerlScript" RUNAT=Server>
$Response->write("Hello world!");
</SCRIPT>
</BODY>
</HTML>
<%
and %>
:
The first line of the script, <%@ LANGUAGE = PerlScript %>
<HTML>
<HEAD>
<TITLE>PerlScript Hello World!</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<H1>PerlScript Hello world!</H1>
<%
$Response->write("Hello world!");
%>
</BODY>
</HTML>
<%@ LANGUAGE = PerlScript %>
tells the server that
you are using PerlScript, rather than any of the other scripting languages supported by Active
Server Pages.
<%= $hello %>
$hello
.
Client-side PerlScript
<SCRIPT LANGUAGE="PerlScript"> </SCRIPT>
write()
method of the document object.
You can use the write()
method with $windows->document->write('any old
text')
.
<HTML>
<HEAD>
<TITLE>PerlScript Hello World!</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<H1>PerlScript Hello world!</H1>
<SCRIPT LANGUAGE="PerlScript">
$window->document->write('Hello world!');
</SCRIPT>
</BODY>
</HTML>
Other References
PerlScript |