Burning glass Technologies

Burning glass Technologies
Checktronix India Private Limited

Monday, April 12, 2010

PERL INTRO

INRODUCTION TO PERL:
Perl stands for Practical Extraction and Reporting Language. Perl is a general-purpose, high level, interpreted and dynamic computer programming language with a vast number of uses. Perl was invented by Larry Wall, a linguist working as a systems administrator at NASA in 1987. Today Perl is found in varied applications such as finance, manufacturing, genetics, the military etc to process large data sets. Perl is used to be one of the most popular languages for developing web applications. At that time, Perl is used to write CGI scripts. Perl is very good and optimized for problems that handle 90% of text and 10% of other. Perl is best for short and small programs that can be entered and run on a single command line.
Perl run well on UNIX and Windows systems. If you develop Perl for UNIX system, it can be portable to Windows system as well.
Download and install ActivePerl
You first need to download ActivePerl the latest version from http://www.activestate.com/activeperl/ . You can also find the installation files for other systems and versions via following link http://www.activestate.com/activeperl/downloads/
To install ActivePerl just double click on the installation file. It will guide you through steps with options. Just make your own choices and click next.
To check you installation you can open command line through Run windows and type following command: perl –version or perl -v. If you installed Perl successfully, you will see the version and copyright information.
FIRST PERL PROGRAM
First, you open the Open Notepad or Notepad++ and type the following code:
1. #E:/usr/bin/perl
2. print "Hello World!\n";
You can save the Perl source code file with any name and extensions you want. Perl source code file should has extension *.pl or *.ple (Perl executable).
Running the program:
Go to cmd prompt-> type perl filename.pl
Let's look at the program in more details.
The first line of the program is a special comment. Comments in Perl program start from the pound sign (#) to the rest of line. There is no sign for block comment.
The second line starts with print statement followed by a string “Hello World” and then followed by a semi-comma. Every Perl statement has to be ended with a semi-comma (;).

1 comment: