Perl: Cryptic Power

Perl is a programming languages that is quite different from PHP. It is not that easy to learn and use. It is quite similar to 'C' and Unix shell scripts. If you are not well-versed with these languages, then you must avoid the use of Perl. However, if you know them Perl will be a languages worth exploring.

The Values of Perl
Perl works on the following philosophy:

* There is always more than one way to complete a task
* Easy things are easy, difficult ones can be made possible.

Perl is available for free and is closely associated with an open source movement. You can find the source code of other useful scripts and see how they work. However, reading and understanding script written by others can be very difficult.

Why Use Perl?
The strength of Perl lies in the fact that most of the things can be done with the use of regexps, or regular expression. Perl has the powerful ability to manipulate the text and make it suitable for web pages. However, it looks like a complete nonsense for those who don't know it. Different keyboard characters have different meanings.

| - Or. For e.g, me|you stands for 'me' or 'you'.

? - stand for one or no character. e.g: per? matches 'perl', 'perk' or 'per', but not 'perks'.

* - stands for a number of characters.

( ) - It is used to separate one group of syntax from the other. For e.g, h(e|a)??o will match both 'hello' and 'halo'.

[ ] - It is used for matching specific characters and ranges of characters.

It can help you to do complicated things to the text. Regexps can be used to validate the data by changing it into valid HTML. For e.g: this set of characters match an email address:

[A-Za-z0-9]+@[A-Za-z0-9]+\.[A-Za-z]{3,5}

This is a clear example for how complicated it is. Hence, most of regexps written are not completely correct and need improvements. However, if practiced correctly it is a very powerful tool.

What Else Can Perl Do?
It contains the standard features of object-oriented programming languages, such as classes, functions and the like. Perl contains a huge library for user contributed functions. They can be downloaded from CPAN. They can be very helpful there are modules on almost everything. It contains about a hundred modules of HTML.

Spread the word

del.icio.us Digg Furl Reddit Ask BlinkList blogmarks Blogg-Buzz Google Ma.gnolia Netscape ppnow Rojo Shadows Simpy Socializer Spurl StumbleUpon Tailrank Technorati Windows Live Wists Yahoo!

Print

Related Entries

Related Tags

, , , ,