Perl

Perl is a programming language invented by Larry Wall to process text. The programming language has been changed many times to do some other things. Some of these things are tasks like making web pages show information in a better way than before, or take information and show it in a way that makes more sense to people. Perl code is written using some symbols besides letters and numbers.

Perl
Paradigm(s)multi-paradigm: functional, imperative, object-oriented (class-based), reflective, procedural, Event-driven, generic
Appeared in1987
Designed byLarry Wall
DeveloperLarry Wall
Stable release5.24.0[1] / May 9, 2016 (2016-05-09)
Preview release5.23.2[2] / August 20, 2015 (2015-08-20)
Influenced byAWK, Smalltalk 80, Lisp, C, C++, sed, Unix shell, Pascal
InfluencedPython, PHP, Ruby, ECMAScript/Javascript, LPC, Windows PowerShell, Falcon, Perl 6, Qore, Julia
Implementation languageC
OSCross-platform
LicenseGNU General Public License or Artistic License[3]
Usual filename extensions.pl .pm .t .pod
Websitewww.perl.org
Wikibooks logo Perl Programming at Wikibooks

Usage

Perl is very good at searching through text looking for patterns, which lets people find words that they may be looking for, or also let people find words they are looking for, and change them with different words much more quickly than they would if they had to do it one word at a time.

Perl is also a high-level programming language. A high-level language has advanced features which let the programmer tell the computer what to do without having to worry about how the computer is going to do it as compared to low-level programming languages which often require more programmer effort.

Example

An example Hello World program in Perl:

<syntaxhighlight lang="perl"> say 'Hello World!' </syntaxhighlight> You can use variables in Perl.

A variable is a box where you can put items. In Perl, some variables starts with their own sigil. A sigil is the way to tell the Perl interpreter about what type of variable you are using. Variables can be scalar, array, hash, handle, regular expression, typeglob or subroutine.

For example: <syntaxhighlight lang="perl"> my $a_scalar = 2; my $b = 5.29 ; my $c = "a string"; my $d = 'another'; my @e = ($b,3,4,$c,$d); my %f = ('a'=>$b,'cad'=>'pqr',$c=>$d); </syntaxhighlight>

Perl packages

The Comprehensive Perl Archive Network, aka CPAN, hosts a large number of extensions to Perl which may be downloaded for free.

Perl Media

References

  1. "Perl 5.24.0 is now available!". perl.org. Retrieved 2016-05-25.
  2. "perl-5.23.2 is now available". perl.org. Retrieved 2015-09-30.
  3. "Perl Licensing". dev.perl.org. Retrieved 2011-01-08.

Other websites