Monday, July 2, 2012

Perl

Perl Programming Language


          The programming language Perl does not have an official acronym but there are various backronyms or reverse acronyms such as Practical Extraction and Reporting Laguange and Pathologically Eclectic Rubbish Lister. It is also nicknamed as "the Swiss Army chainsaw of scripting languages" and also referred as the "duct tape that holds the Internet together."

       In 1987, Larry Wall originally developed the said language as a general-purpose Unix scripting language. His purpose was to make report processing easier and that is where it started. It undergone many changes and revisions that sooner it became popular among programmers.

          Perl, was originally named "Pearl" but Wall wanted it to be more appealing so he rejected every three-and-four letter word in the dictionary. He also considered naming it after his wife, Gloria. He discovered the existing PEARL programming language before Perl's official release and changed the spelling of the name.

        It is a high-level, general-purpose, interpreted, dynamic programming language. It is highly capable, feature-rich with over 24 years of development. Moreover, some of its features are borrowed from other languages like C, AWK, shell scripting and sed.

        The language does not only provides powerful text processing facilities but also easy manipulation of text files. Its parsing abilities made a widespread popularity in 1990s. Lastly, its flexibility and power was shown through its features -- graphics programming, system administration, network programming, finance, bioinformatics, and other applications.

Powerful, stable, mature, portable that's how they describe Perl.


Here are some of the opinions of famous computer scientists about it:

"Perl doesn't have an infatuation with enforced privacy. It would
prefer that you stayed out of its living room because you weren't
invited, not because it has a shotgun"
-- Larry Wall

"Perl - The only language that looks the same before and after RSA encryption."

-- Keith Bostic

"and don't tell me there isn't one bit of difference between null and

space, because that's exactly how much difference there is"
-- Larry Wall

"I want to see people using Perl to glue things together creatively,

not just technically but also socially."
-- Larry Wall

Perl is fun. In these days of self-serving jargon, conflicting and

unpredictable standards, and proprietary systems that discourage
peeking under the hood, people have forgotten that programming is
supposed to be fun. I don't mean the satisfaction of seeing our
well-tuned programs do our bidding, but the literary act of creative
writing that yields those programs. With Perl, the journey is as
enjoyable as the destination ...
-- The Perl Journal, "What is Perl?"

Sometimes it is necessary to "go cowboy" on your geek and bring things

to a standoff. When your geek blandly tells you that something isn't
possible, thank him for his time. Suggest that he is clearly very
busy, and that you will attempt to solve the problem yourself. Tell
your geek you will need root access for this, and demand all passwords
necessary. Ask where the Camel Book is. Your geek will immediately and
grumblingly do what you need him to do. Act impressed and grateful.
-- Mikki Halpin, The Geek Handbook, pp51

If you don't know Perl, you don't know Dick.

--an interview article on linux.com

Here are some opinions about the language from other people in twitter:

The power, the absolute power. -Ironcamel

The "many ways to get things done" approach makes me feel like a smart
guy even if I'm doing it my way. -Mamod

If love Perl because of the avesomeness of the community and the
utility of CPAN. -robinsmidrod

If you love job security and don't respect yourself, you will love Perl.-xardox

Our personal opinions about the language:
 
"Perl, for me, is very flexible and is versatile. It can be used for Web programming, databases, etc. Also, it uses a C-like syntax, making us familiar on how to manipulate or create a certain program in Perl. Lastly, Perl can be used in any platform, and is free." -Eric Beronio

"Everywhere at once. I can say that it is very practical in nature where you can use it easily, efficiently, and completely." -Charmaine Pabelico

"I look forward using Perl because its design eases the task of the programmer. It all boils to this paraphrase, easy things are easy in Perl while hard things should be tried.. 'coz it's possible." -Kevin Romas

"Perl is all about doing what you like. Its flexibility is what programmers love about it." -Leah Abarra

"Perl's capability to easily and powerfully facilitate manipulation of text files makes it very suitable for network systems and database applications. For me, I can say it can add a social life to a hardcore programmer, getting rid of some of his many burdens." - Julian Aseneta

This is how you write a basic Hello World program..

1. Write a Hello World Perl Program
                Create the hello-world.pl program using a text editor.

                     #!/usr/bin/perl

                     # Hello world perl program                     

                     print "Hello World!";
                     print "This is my first program in PERL.";
  

2. Make sure Perl Interpreter is installed on your system
                Make sure perl interpreter is installed on your system as shown below.

                     $ whereis perl
                     perl: /usr/bin/perl /etc/perl /usr/lib/perl
                     usr/share/perl /usr/share/man/man1/perl.1.gz

                    $ which perl
                    /usr/bin/perl


3. Execute the Perl Program
              You can either execute using “perl hello-world.pl” or “./hello-world.pl”.                      
               $ perl helloworld.pl
                     Hello World!

                                 ( or )
                     
                     $ chmod u+x hello-world.pl

                     $ ./hello-world.pl

                     A sample run of your hello-world program would look like this..



4. Writing and Executing Perl One liner
            You can also execute perl from the command line as shown below. This will print Hello World!.

                     perl -e 'print "Hello World!\n"'


5. Perl also features object oriented programming like java. A simple Hello World program with a basic user interface would look like this:







Group Name: PERL MONKS
Section: T-8L

MEMBERS:
DJ Rice, 2010-10758 
Loki, 2010-68644 
Dust 2010-0442
Moriah, 2010-00871
Julian, 2010-19882

No comments:

Post a Comment