Monday, November 15, 2010

PERL

Perl is one of the programming language. PERL stands for Practical Report and Extraction Language.

'perl' is the name of the executable code.

"Perl5" -- means Versions of Perl that means "Perl version 5".

Some Perl Facts:

  • Perl is a stable and cross platform programming language.
  • It is used for the purpose of mission critical projects in the private and public sectors.
  • Perl is a Open Source software

http://kona.kontera.com/javascript/lib/imgs/grey_loader.gif

, licensed under its Artistic License, or the GNU General Public License (GPL).

  • Perl was created by Mr Larry Wall.
  • Perl 1.0 was released in 1987 to usenet's alt.comp.sources.
  • PC Magazine named Perl a finalist for Technical Excellence Award in the Development Tool category in 1998.
Perl is also listed in the Oxford English Dictionary.

Supported Operating Systems in Perl:
  • Unix systems.
  • Macintosh - (OS 7-9 and X) see The MacPerl Pages.
  • Windows - see ActiveState Tools Corp.
  • VMS.
Features of Perl
  • Perl takes all the best features from languages, like C, awk, sed, sh, and BASIC, including others.
  • The database integration interface of perl supports third-party databases like Oracle, Sybase, Postgres MySQL and many others.
  • Perl works well with HTML, XML, and other mark-up languages.
  • Perl also supports Unicode.
  • Perl is a Y2K compliant.
  • Through XS or SWIG Perl interfaces with external C/C++ libraries.
  • Perl is extensible. There are more than 500 third party modules which are available from the Comprehensive Perl Archive Network.
  • The Perl interpreter can also be embedded into other systems
Web and the Perl
  • Due to its text manipulation capabilities and rapid development

http://kona.kontera.com/javascript/lib/imgs/grey_loader.gif

cycle, Perl has become the most popular web programming language.

  • Widely Perl is known as " the duct-tape of the Internet".
  • Perl's CGI.pm module which is a part of Perl's standard distribution, makes HTML forms handling simple.
  • Including e-commerce transactions, Perl can handle encrypted Web data.
  • We can embed Perl into web servers

http://kona.kontera.com/javascript/lib/imgs/grey_loader.gif

to speed up the processing by as much as 2000%.

  • Apache web server is allowed to embed a Perl interpreter by mod_perl Web-database integration is made easy by Perl's DBI package.

First Perl Program

Take the following text and put it into a file called first.pl:

     #!/usr/local/bin/perl
     print "Hi there!\n";

Now, run it with Perl interpreter. From a command line, go to the directory with this file and type perl first.pl. You should see:

     Hi there!

The \n indicates the ``newline'' character; without it, Perl doesn't skip to a new line of text on its own.

Functions and Statements

Perl has a rich library of functions. Almost all functions can be given a list of parameters, which are separated by commas.

The print function is one of the most frequently used parts of Perl. You use it to display things on the screen or to send information to a file. It takes a list of things to output as its parameters.

   print "This is a single statement.";
   print "Look, ", "a ", "list!";

A Perl program consists of statements, each of which ends with a semicolon. Statements don't need to be on separate lines; there may be multiple statements on one line or a single statement can be split across multiple lines.

print "This is "; print "two statements.\n"; print "But this ",

          "is only one statement.\n";



No comments:

Post a Comment