SlideShare uma empresa 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

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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
 

Destaque (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)
 

Semelhante 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
 

Semelhante 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

Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxnelietumpap1
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 

Último (20)

Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptx
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 

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";