SlideShare una empresa de Scribd logo
1 de 15
Introduction To PERL Language



      Abhishek Pachisia
       B.Tech-IT (4th yr)
FOREWORD

   Original name Pearl.
   Perl is a high-level, general-purpose, interpreted, dynamic
    programming language.
   Perl is a programming language suitable for writing simple
    scripts as well as complex applications.
   Perl is not officially an acronym.
   Perl was originally developed by Larry Wall in 1987 as a
    general-purpose Unix scripting language
   According to Wall, Perl has two slogans.
     "There's more than one way to do it“.
     "Easy things should be easy and hard things should be
      possible"
BRIEF HISTORY
 PERL 1 - Released on December 18, 1987.
 PERL 2 - Released in 1988. Better regular
           expression engine.
 PERL 3 - Released in 1989. Support for binary
            data streams.
 PERL 4 - Released in 1991. To identify the
           version.
 Programming Perl -1991. Known as Camel Book.

 PERL 4.036 – Released in 1993.

 CPAN – 26 October, 1995.
VERSIONS OF PERL 5
   PERL 5 porters – Released on May,1994.
   PERL 5.000 - October 17,1994. Rewrite of
                  the interpreter + Many new features.
   PERL 5.001 - March 13,1995.
   PERL 5.002 - February 29,1996. New prototypes
                 feature
   PERL 5.003 - June 25,1996. Security release.
   PERL 5.004 - May 15,1997.Included UNIVERSAL
                 package
   PERL 5.005 - July 22,1998.Regex engine
   PERL 5.6 – March 22,2000. 64-bit
       support, Unicode string representation etc.
SYMBOLS
   Dromedary Camel
       Non-Commercial.




   Onion
       Licenses to its subsidiaries.
FEATURES
 The overall structure of Perl derives broadly from C.
 Perl also takes features from shell programming.

 All variables are marked with leading sigils.

 It has many built-in functions.

 Perl takes
       Lists from Lisp,
       Hashes ("associative arrays") from AWK, and
       Regular expressions from sed.
FEATURES THAT EASE TASK OF PROGRAMMER

 Automatic memory management,
 Dynamic typing,

 Strings,

 Lists, and hashes,

 Regular expressions,

 Introspection and

 An eval() function.
DESIGN - 1
   Response to three broad trends in the computer
    industry –
     Falling hardware costs,
     Rising labour costs, and
     Improvements in compiler technology.

 Make efficient use of expensive computer-
  programmers.
 No built-in limits similar to the Zero One Infinity rule.

 Syntax reflects the idea that "things that are
  different should look different”
DESIGN - 2
 Perl favours language constructs that are concise
  and natural for humans to write.
 Perl does not enforce any particular programming
  paradigm.
 Not    a tidy language. Resolve syntactical
  ambiguities.
 No written specification/standard through Perl 5

 That   interpreter, together with its functional
  tests, stands as a de facto specification of the
  language.
IMPLEMENTATION - 1
 Implemented as a core interpreter, written in C.
 The interpreter is 150,000 lines of C code and
  compiles to a 1 MB executable on typical machine
  architectures.
 The interpreter has an object-oriented architecture.
 All of the elements are represented in the
  interpreter by C structs.
 The life of a Perl interpreter divides broadly into a
  compile phase and a run phase.
 In compile phase , Compilation occurs.
 In run phase, Execution occurs.
IMPLEMENTATION-2
 At compile time, the interpreter parses Perl code
  into a syntax tree.
 At run time, it executes the program by walking the
  tree.
 Text is parsed only once, and the syntax tree is
  subject to optimization before it is executed.
 It is often said that “Only Perl can parse Perl”.

 Perl makes the unusual choice of giving the user
  access to its full programming power in its own
  compile phase.
 The cost in terms of theoretical purity is high, but
  practical inconvenience seems to be rare.
CPAN
   Comprehensive Perl Archive Network.
   An archive of over 114,000 modules of software
    written in Perl, as well as documentation for it.
   CPAN can denote
     Archive network itself, or
     The Perl program that acts as an interface to the network
      and as an automated software installer
   Most software on CPAN is free and open source
    software.
   Components:
     Mirrors
     Search engines
     Testers
     CPAN.pm and CPANPLUS
COMPLEX PERL PROGRAM
#!/usr/bin/perl
use strict;
use warnings;
use Time::HiRes qw(sleep time);
use POSIX qw();
use IO::Handle;

my $delay = shift(@ARGV);

STDOUT->autoflush(1);
{
  my $start = time();
  my $end = $start + $delay;
my $last_printed;
  while ((my $t = time()) < $end)
  {
       my $new_to_print = POSIX::floor($end - $t);

       if (!defined($last_printed) or $new_to_print !=
  $last_printed)
       {
                $last_printed = $new_to_print;
                print "Remaining $new_to_print/$delay", ' '
  x 40, "r";
       }
  sleep(0.1);
  }
}
print "n";
Perl

Más contenido relacionado

La actualidad más candente

Lecture 1 Compiler design , computation
Lecture 1 Compiler design , computation Lecture 1 Compiler design , computation
Lecture 1 Compiler design , computation Rebaz Najeeb
 
Ecet 330 Enthusiastic Study / snaptutorial.com
Ecet 330 Enthusiastic Study / snaptutorial.comEcet 330 Enthusiastic Study / snaptutorial.com
Ecet 330 Enthusiastic Study / snaptutorial.comStephenson033
 
Implementation - Sample Runs
Implementation - Sample RunsImplementation - Sample Runs
Implementation - Sample RunsAdwiteeya Agrawal
 
How to use Ruby code inside Elixir
How to use Ruby code inside ElixirHow to use Ruby code inside Elixir
How to use Ruby code inside ElixirWeverton Timoteo
 
Firebird Python Drivers: Current state and future
 Firebird Python Drivers: Current state and future Firebird Python Drivers: Current state and future
Firebird Python Drivers: Current state and futureMind The Firebird
 

La actualidad más candente (8)

Lecture 1 Compiler design , computation
Lecture 1 Compiler design , computation Lecture 1 Compiler design , computation
Lecture 1 Compiler design , computation
 
Ecet 330 Enthusiastic Study / snaptutorial.com
Ecet 330 Enthusiastic Study / snaptutorial.comEcet 330 Enthusiastic Study / snaptutorial.com
Ecet 330 Enthusiastic Study / snaptutorial.com
 
Design
DesignDesign
Design
 
Implementation - Sample Runs
Implementation - Sample RunsImplementation - Sample Runs
Implementation - Sample Runs
 
OIVM
OIVMOIVM
OIVM
 
MPI - 1
MPI - 1MPI - 1
MPI - 1
 
How to use Ruby code inside Elixir
How to use Ruby code inside ElixirHow to use Ruby code inside Elixir
How to use Ruby code inside Elixir
 
Firebird Python Drivers: Current state and future
 Firebird Python Drivers: Current state and future Firebird Python Drivers: Current state and future
Firebird Python Drivers: Current state and future
 

Destacado (20)

Top Management of 5 recognized comapanies
Top Management of 5 recognized comapaniesTop Management of 5 recognized comapanies
Top Management of 5 recognized comapanies
 
Tree
TreeTree
Tree
 
Rpc
RpcRpc
Rpc
 
Boeing- The Frontiers
Boeing- The FrontiersBoeing- The Frontiers
Boeing- The Frontiers
 
Cloud Service Models
Cloud Service ModelsCloud Service Models
Cloud Service Models
 
Fourier transform
Fourier transformFourier transform
Fourier transform
 
File System Implementation
File System ImplementationFile System Implementation
File System Implementation
 
Rms titanic
Rms titanicRms titanic
Rms titanic
 
Telecom Industry
Telecom IndustryTelecom Industry
Telecom Industry
 
V.G. siddhartha
V.G. siddharthaV.G. siddhartha
V.G. siddhartha
 
Strategic alignment model (SAM)
Strategic alignment model (SAM)Strategic alignment model (SAM)
Strategic alignment model (SAM)
 
Vb.net (loop structure)
Vb.net (loop structure)Vb.net (loop structure)
Vb.net (loop structure)
 
Matrix Representation Of Graph
Matrix Representation Of GraphMatrix Representation Of Graph
Matrix Representation Of Graph
 
Hydrogen energy
Hydrogen energyHydrogen energy
Hydrogen energy
 
Inference engine
Inference engineInference engine
Inference engine
 
Exception handling in Java
Exception handling in JavaException handling in Java
Exception handling in Java
 
Work breakdown structure
Work breakdown structureWork breakdown structure
Work breakdown structure
 
IEEE 802.11
IEEE 802.11IEEE 802.11
IEEE 802.11
 
Expert Systems
Expert SystemsExpert Systems
Expert Systems
 
Program Evaluation and Review Technique (PERT)
Program Evaluation and Review Technique (PERT)Program Evaluation and Review Technique (PERT)
Program Evaluation and Review Technique (PERT)
 

Similar a Perl

WEB PROGRAMMING UNIT V BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT V BY BHAVSINGH MALOTHWEB PROGRAMMING UNIT V BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT V BY BHAVSINGH MALOTHBhavsingh Maloth
 
Future of PERL in IT
Future of PERL in ITFuture of PERL in IT
Future of PERL in ITNexiilabs
 
Mastering Regex in Perl
Mastering Regex in PerlMastering Regex in Perl
Mastering Regex in PerlEdureka!
 
Keeping up with Perl: Development, Upgrade and Deployment Options for Perl 5.12
Keeping up with Perl: Development, Upgrade and Deployment Options for Perl 5.12Keeping up with Perl: Development, Upgrade and Deployment Options for Perl 5.12
Keeping up with Perl: Development, Upgrade and Deployment Options for Perl 5.12ActiveState
 
Unit 1-introduction to perl
Unit 1-introduction to perlUnit 1-introduction to perl
Unit 1-introduction to perlsana mateen
 
Introduction to perl
Introduction to perlIntroduction to perl
Introduction to perlsana mateen
 
introductiontoperl-springpeople-150605065831-lva1-app6891.pptx
introductiontoperl-springpeople-150605065831-lva1-app6891.pptxintroductiontoperl-springpeople-150605065831-lva1-app6891.pptx
introductiontoperl-springpeople-150605065831-lva1-app6891.pptxmayilcebrayilov15
 
Perl family: 15 years of Perl 6 and Perl 5
Perl family: 15 years of Perl 6 and Perl 5Perl family: 15 years of Perl 6 and Perl 5
Perl family: 15 years of Perl 6 and Perl 5Michal Jurosz
 
Introduction to perl_ a scripting language
Introduction to perl_ a scripting languageIntroduction to perl_ a scripting language
Introduction to perl_ a scripting languageVamshi Santhapuri
 
Introduction To Perl - SpringPeople
Introduction To Perl - SpringPeopleIntroduction To Perl - SpringPeople
Introduction To Perl - SpringPeopleSpringPeople
 
Unit1 principle of programming language
Unit1 principle of programming languageUnit1 principle of programming language
Unit1 principle of programming languageVasavi College of Engg
 
introduction to Perl _ the programming language.pptx
introduction to Perl _ the programming language.pptxintroduction to Perl _ the programming language.pptx
introduction to Perl _ the programming language.pptxgayathriaddula502
 

Similar a Perl (20)

Perl
PerlPerl
Perl
 
WEB PROGRAMMING UNIT V BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT V BY BHAVSINGH MALOTHWEB PROGRAMMING UNIT V BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT V BY BHAVSINGH MALOTH
 
Group1_PERL.pptx
Group1_PERL.pptxGroup1_PERL.pptx
Group1_PERL.pptx
 
Future of PERL in IT
Future of PERL in ITFuture of PERL in IT
Future of PERL in IT
 
Mastering Regex in Perl
Mastering Regex in PerlMastering Regex in Perl
Mastering Regex in Perl
 
Keeping up with Perl: Development, Upgrade and Deployment Options for Perl 5.12
Keeping up with Perl: Development, Upgrade and Deployment Options for Perl 5.12Keeping up with Perl: Development, Upgrade and Deployment Options for Perl 5.12
Keeping up with Perl: Development, Upgrade and Deployment Options for Perl 5.12
 
Perl Reference.ppt
Perl Reference.pptPerl Reference.ppt
Perl Reference.ppt
 
Unit 1-introduction to perl
Unit 1-introduction to perlUnit 1-introduction to perl
Unit 1-introduction to perl
 
Introduction to Perl
Introduction to PerlIntroduction to Perl
Introduction to Perl
 
Introduction to perl
Introduction to perlIntroduction to perl
Introduction to perl
 
introductiontoperl-springpeople-150605065831-lva1-app6891.pptx
introductiontoperl-springpeople-150605065831-lva1-app6891.pptxintroductiontoperl-springpeople-150605065831-lva1-app6891.pptx
introductiontoperl-springpeople-150605065831-lva1-app6891.pptx
 
Perl family: 15 years of Perl 6 and Perl 5
Perl family: 15 years of Perl 6 and Perl 5Perl family: 15 years of Perl 6 and Perl 5
Perl family: 15 years of Perl 6 and Perl 5
 
Introduction to perl_ a scripting language
Introduction to perl_ a scripting languageIntroduction to perl_ a scripting language
Introduction to perl_ a scripting language
 
The Parrot VM
The Parrot VMThe Parrot VM
The Parrot VM
 
Introduction To Perl - SpringPeople
Introduction To Perl - SpringPeopleIntroduction To Perl - SpringPeople
Introduction To Perl - SpringPeople
 
Unit 1
Unit 1Unit 1
Unit 1
 
Intro
IntroIntro
Intro
 
Intro
IntroIntro
Intro
 
Unit1 principle of programming language
Unit1 principle of programming languageUnit1 principle of programming language
Unit1 principle of programming language
 
introduction to Perl _ the programming language.pptx
introduction to Perl _ the programming language.pptxintroduction to Perl _ the programming language.pptx
introduction to Perl _ the programming language.pptx
 

Último

Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 

Último (20)

Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 

Perl

  • 1. Introduction To PERL Language Abhishek Pachisia B.Tech-IT (4th yr)
  • 2. FOREWORD  Original name Pearl.  Perl is a high-level, general-purpose, interpreted, dynamic programming language.  Perl is a programming language suitable for writing simple scripts as well as complex applications.  Perl is not officially an acronym.  Perl was originally developed by Larry Wall in 1987 as a general-purpose Unix scripting language  According to Wall, Perl has two slogans.  "There's more than one way to do it“.  "Easy things should be easy and hard things should be possible"
  • 3. BRIEF HISTORY  PERL 1 - Released on December 18, 1987.  PERL 2 - Released in 1988. Better regular expression engine.  PERL 3 - Released in 1989. Support for binary data streams.  PERL 4 - Released in 1991. To identify the version.  Programming Perl -1991. Known as Camel Book.  PERL 4.036 – Released in 1993.  CPAN – 26 October, 1995.
  • 4. VERSIONS OF PERL 5  PERL 5 porters – Released on May,1994.  PERL 5.000 - October 17,1994. Rewrite of the interpreter + Many new features.  PERL 5.001 - March 13,1995.  PERL 5.002 - February 29,1996. New prototypes feature  PERL 5.003 - June 25,1996. Security release.  PERL 5.004 - May 15,1997.Included UNIVERSAL package  PERL 5.005 - July 22,1998.Regex engine  PERL 5.6 – March 22,2000. 64-bit support, Unicode string representation etc.
  • 5. SYMBOLS  Dromedary Camel  Non-Commercial.  Onion  Licenses to its subsidiaries.
  • 6. FEATURES  The overall structure of Perl derives broadly from C.  Perl also takes features from shell programming.  All variables are marked with leading sigils.  It has many built-in functions.  Perl takes  Lists from Lisp,  Hashes ("associative arrays") from AWK, and  Regular expressions from sed.
  • 7. FEATURES THAT EASE TASK OF PROGRAMMER  Automatic memory management,  Dynamic typing,  Strings,  Lists, and hashes,  Regular expressions,  Introspection and  An eval() function.
  • 8. DESIGN - 1  Response to three broad trends in the computer industry –  Falling hardware costs,  Rising labour costs, and  Improvements in compiler technology.  Make efficient use of expensive computer- programmers.  No built-in limits similar to the Zero One Infinity rule.  Syntax reflects the idea that "things that are different should look different”
  • 9. DESIGN - 2  Perl favours language constructs that are concise and natural for humans to write.  Perl does not enforce any particular programming paradigm.  Not a tidy language. Resolve syntactical ambiguities.  No written specification/standard through Perl 5  That interpreter, together with its functional tests, stands as a de facto specification of the language.
  • 10. IMPLEMENTATION - 1  Implemented as a core interpreter, written in C.  The interpreter is 150,000 lines of C code and compiles to a 1 MB executable on typical machine architectures.  The interpreter has an object-oriented architecture.  All of the elements are represented in the interpreter by C structs.  The life of a Perl interpreter divides broadly into a compile phase and a run phase.  In compile phase , Compilation occurs.  In run phase, Execution occurs.
  • 11. IMPLEMENTATION-2  At compile time, the interpreter parses Perl code into a syntax tree.  At run time, it executes the program by walking the tree.  Text is parsed only once, and the syntax tree is subject to optimization before it is executed.  It is often said that “Only Perl can parse Perl”.  Perl makes the unusual choice of giving the user access to its full programming power in its own compile phase.  The cost in terms of theoretical purity is high, but practical inconvenience seems to be rare.
  • 12. CPAN  Comprehensive Perl Archive Network.  An archive of over 114,000 modules of software written in Perl, as well as documentation for it.  CPAN can denote  Archive network itself, or  The Perl program that acts as an interface to the network and as an automated software installer  Most software on CPAN is free and open source software.  Components:  Mirrors  Search engines  Testers  CPAN.pm and CPANPLUS
  • 13. COMPLEX PERL PROGRAM #!/usr/bin/perl use strict; use warnings; use Time::HiRes qw(sleep time); use POSIX qw(); use IO::Handle; my $delay = shift(@ARGV); STDOUT->autoflush(1); { my $start = time(); my $end = $start + $delay;
  • 14. my $last_printed; while ((my $t = time()) < $end) { my $new_to_print = POSIX::floor($end - $t); if (!defined($last_printed) or $new_to_print != $last_printed) { $last_printed = $new_to_print; print "Remaining $new_to_print/$delay", ' ' x 40, "r"; } sleep(0.1); } } print "n";