Beyond
HTML: Tools for Interactivity
Tool #3: CGI/Perl
PERL (Practical Extraction and Report Language)
has become the scripting language of the Web, as most CGI (see below) programs
are written in Perl. However, Perl is widely used as a rapid prototyping language
and a "glue" language that makes it possible for different systems
to work well together. Perl is also popular with system administrators who use
it for an infinite number of automation tasks.
CGI (Common Gateway Interface) standard lays down the rules for running
external programs in a Web server. External programs are called gateways because
they open up an outside world of information to the server. CGI is the method
by which a web server can obtain data from (or send data to) databases, documents,
and other programs, and present that data to viewers via the web. CGI can be
written in any programming language like C, C++, or Java, but Perl is the most
popular.
Browser Support
Perl’s browser interaction is "standardized" so Perl should work
with each and every browser. Perl was developed to run on best on UNIX, but
it operates well on Macintosh, and PC systems.
What can Perl do?
Perl lets you interact with your users in many different ways.
- Through guestbooks and feedback forms, you can get a sense of who your users
are and what they think about your web page.
Example--Using ITC’s
Easyform to get feedback:
http://www.itc.virginia.edu/desktop/web/feedback.html
- Perl provides stability to your web page that JavaScript might not (Perl
is less likely to crash your use users' browsers).
Example--
- Search tools allow users to search your site efficiently and quickly. If
you have ever used Amazon or Yahoo, you have encountered Perl.
Example--Searching ITC'sWorld Wide Web Support and Services site:
http://www.itc.virginia.edu/desktop/web/
Pitfalls
- Coding includes many shortcuts, so can be difficult to modify and debug.
Effect on System Performance
- Server processing can be slowed down, so it is important to optimize scripts
for best performance.
Perl Resources
- ITC Guestbook, Easyform, and LSearch scripts are ready to be installed on
your site, no additional Perl scripting required:
Guestbook: http://www.itc.virginia.edu/desktop/web/guestdoc.html
Easyform/Easymail: http://www.itc.virginia.edu/desktop/web/efdoc.html
LSearch: http://www.itc.virginia.edu/desktop/web/lsdoc.html
Introduction | Tool
Types
JavaScript | DHTML
| CGI/Perl | Cold Fusion
| Java