|
Introduction to PERLPerl (Practical Extraction and Report Language) is a language first designed for UNIX system administration. By borrowing heavily from C, sed, awk, and the Unix shells, Perl has become the language for many file processing and management, process management, and system administration tasks with its sophisticated pattern matching capabilities and flexible syntax. But it was not until the birth of CGI that PERL became so popular. Today no other language matches PERL's position in the CGI world. Over the years, Perl has been ported to many different platforms such as MS-DOS and Windows NT. Unlike C and other compiled programming languages, Perl is interpreted. So we often call the Perl program "Perl script". The latest version is Perl 5.0. Hello, World ExampleHere is the famous Hello World example that we'll use to get started. #!/usr/local/bin/perl #------------------------------------------- # helloWorld.pl by Zhanshou Yu #------------------------------------------- #This is a html file print"Content-type: text/html\n\n"; #The html output print "<html>\n"; print "<head><title>Hello World !!!</title></head>\n"; print "<body>\n"; print "<h2>Hello World !!!</h2>\n"; print "</body>\n"; print "</html>\n"; exit; Program ComponentsThere are three main parts to this program:
How to Run the program
![]() ![]() ![]() |