Client-side PerlScript
Client-Side PerlScript has Perl embedded within your HTML documents. All PerlScript code must be contained
within <SCRIPT LANGUAGE="PerlScript"> </SCRIPT>
Client-side PerlScript has the added requirement that both Perl for Win32 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 write()
method of the document object. You can use the write()
method with $windows->document->write('any old text')
.
The sample below is another Hello World variation, but this time using client-side PerlScript:
<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>