Active Client Pages produce web pages at the client computer using web technology. The programming analysis, logic and calculations of the data for the pages are done at the client. The data to create the pages resides on the server. So what is the role of the server? That is what this article addresses. You need basic knowledge of JavaScript and Perl to understand it.
Active Client Pages at the Server - Using Perl to send a string to the client (Page 3 of 4 )
The Perl file called by the client, in its simplest form, is as follows:
$sendStr = qq{
#HTML page and JavaScripts without escaping the entities
};
print $sendStr;
You have the quoting operator, named qq{}. Whatever is in the {} brackets is considered a string. You do not need to escape any entity in the qq{} operator.
There are two Perl statements here: the one for the quoting operator and “print $returnStr;”. This last statement returns the string to the browser at the client.
In this simple example, the string in the qq{} operator is a web page, made up of HTML elements and JavaScripts. The browser can use this string without modification to produce a new page. This string can actually be anything which the JavaScript at the client can handle.
You can have more Perl statements than I've shown in this example; however, the statements must all work to produce the string.