![]() |
|
|
Published: Friday, February 11, 2000
What is Perl?
I find Perl to be a fun language to program in, but it is not nearly as English-like as VBScript. Perl intrinsically supports three main data types: scalars, arrays, and associative arrays (hashes/Dictionaries). With these intrinsic datatypes, along with intrinsic file handling and regular expression capabilities, make Perl a very "useful" language, espcially for file processing. Perl has its roots in a myriad of languages like C, Fortran, awk, and sed, so its syntax is very far from VBScript. However, I think Perl is a language worth learning. If you already know C/Fortran or Java/JavaScript well, you will pick up Perl rather quickly. To learn more about Perl, be sure to visit Perl.com.
OK, so What is PerlScript? When using an ASP page, you can tie into any compliant ActiveX Scripting Engine. The one most commonly used is the VBScript ActiveX Scripting Engine. However, there is nothing to prevent you from using another server-side scripting language like PerlScript. Once you've downloaded and installed ActivePerl on your Web server, you can begin to use PerlScript in your ASP pages (note that you can also use PerlScript in your WSH scripts as well)! To do so, you need to include the following line of code on your ASP pages that you wish to use PerlScript:
Now, start writing PerlScript code! As with JScript, PerlScript is case sensitive. Furthermore, PerlScript uses
a prefix character to indicate the type of variable being used. For example, if you wanted to create a scalar
variable, you need to prefix it with a
The ASP intrinsic objects are accessed by prefixing the object name with a
Each statement needs to end with a semicolon (similar to JScript). Note that rather than using a period to
access a method of an object (as in
Note that when using PerlScript, you simply place the variable name in the string. PerlScript will seach the
output string for words prefixed by a Now, this article wasn't intended as a tutorial for PerlScript. Rather, its intention was to inform you about the ability of using PerlScript as an alternative server-side scripting language. Happy Programming!
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||