next up previous contents
Next: 5.5 Closing Thoughts on Up: 5 Choosing a Language Previous: 5.3 C and C++   Contents

5.4 Perl and PHP

An additional language that is in some sense tied to C is Perl. Perl stands for Practical Extraction and Report Language, and it is used for a broad variety of tasks. These include fundamental system and network administration and CGI scripting (for web pages). Its importance to the beginning programmer lies in the CGI scripting mode where Perl is commonly used to create dynamic web page content and other tasks on an http server.

Perl is usually an interpreted language that is essentially parsed to C function calls. Like C, Perl is more of a programmers language and can be very obscure to a novice programmer. In fact, one feature of Perl makes it considerably more difficult for the beginner is TIMTOWTDI ("There Is More Than One Way To Do It"). Many languages, like C and BASIC, have certain 'standard' or 'best' ways of doing certain tasks. This means many programmers will perform a task pretty close to the same way. Perl, on the other hand, is more of a 'free for all.' If you gave the same task to ten programmers, you might get ten ways to do it, each with its own merits. On the plus side, Perl can accomplish some rather complicated tasks with very short programs; this is a trait Perl shares with Command Scripting.

Even though Perl is not generally viewed as a Beginner's language, it is mentioned here due to its popularity in CGI scripting. Dynamic web page content that includes "pl" or''cgi'' in the Uniform Resource Locator (URL) is generated with Perl. If you are interested in developing dynamic web sites, Perl is a powerful option and will be worth learning as your programming experience continues.

A related language, often seen as a cross between Perl and C, is PHP. PHP is easier to learn than Perl. Like Perl, PHP is often used to generate dynamic content on web servers, and shows some performance improvements over cgi scripting. Also, like Perl, PHP can be used to write administration scripts or programs for system administration tasks.


next up previous contents
Next: 5.5 Closing Thoughts on Up: 5 Choosing a Language Previous: 5.3 C and C++   Contents
John S. Riley, DSB Scientific Consulting