PERL
Perl is a popular open-source, server-side scripting language that's supported and developed by a devoted group of users. Perl was derived in large part (but not exclusively) from the C programming language, and is a high-level programming language with a wide range of capabilities. It's best known for its text processing capabilities. It's not as easy to learn and use as ASP or PHP, and can't be embedded directly in HTML pages.
Perl was originally developed for Unix, but also exists in a Windows version (ActivePerl). An extensive collection of modules for Perl can be used to extend its functionality. You can download Perl, ActivePerl, and Perl modules.
Perl scripts can be uploaded to a Web server and then activated by calling them from an HTML form, as in the forms code example earlier in this lesson. Perl is often used with CGI (Common Gateway Interface). CGI is a standard that allows client browsers to exchange information with applications located on a Web server. Perl can also be run directly on a computer without using a browser or a Web server.
You can use Perl to generate HTML output, as in the following code:
#!/usr/bin/perl print "Content-type: text/html\n\n"; print "<html><head><title>Outputting HTML with Perl</title>"; print "</head><body>"; print "<h2>Welcome to my Perl page</h2>"; print "</body></html>";
The main advantages of Perl are as follows:
- It's sophisticated, full-featured text processing features
- It has pre-existing modules that allow rapid application development
You can do the following with Perl:
- Process data forms from HTML forms.
- Make dynamic changes to HTML pages.
- Use a Perl module to access a database and return information to an HTML page.
- Develop complex applications.
- Use regular expressions for complex text manipulation and searches.
For more information on Perl, see:
