SlideShare ist ein Scribd-Unternehmen logo
1 von 9
Downloaden Sie, um offline zu lesen
Perl Tutorial

The Practical Extraction Report Language
• The premier site for Perl information is:

                  http://www.perl.com
• Everything you every wanted to know about Perl, and then some.
• Perl is a creation of Larry Wall

• Current stable release 5.005_03



                Copyright (c) 1999 by Paul Barry, IT Carlow, Kilkenny Road, Carlow, Ireland. All Rights Reserved.
What is Perl?
• A powerful general-purpose programming language
• A high-level, command-driven scripting language
        What is a Scripting Language?
• A programmer/administrator tool designed to allow the bolting
  together of other software tools to solve a problem - we refer to
  the resulting programs as scripts
• Scripts are very popular within the UNIX and Linux world
• Examples of scripting languages include TCL, Python, and
  AppleScript (and - of course - Perl!). MS-DOS batch files are a
  very simple, primitive form of scripts
• Scripting languages are generally interpreted, as opposed to
  compiled


                Copyright (c) 1999 by Paul Barry, IT Carlow, Kilkenny Road, Carlow, Ireland. All Rights Reserved.
What makes Perl different?
• Easy to learn - yippee! - with very good support for standard
  programming constructs
• Very good at processing and formatting text files (the reason it
  was created)
• Freely available, on many platforms (UNIX, Linux, Mac, PC,
  Irix, SunOS, Windows, NT, etc., etc.)
• Strong support from the Internet developer community
• Add-ons available for every conceivable usage - great support for
  Internet standards and protocols
       Why do Programmers like Perl?
• Lots of reasons ...
• Perl gets the job done!


                Copyright (c) 1999 by Paul Barry, IT Carlow, Kilkenny Road, Carlow, Ireland. All Rights Reserved.
A Perl Story #1
• When faced with writing a particularly mundane, but highly
  necessary, program to process thousands of files, a programmer
  was faced with choosing a language
• If he had had to write the program in C, he would have found an
  excuse not to
• If he had had to write the program in C++/Java, he would still be
  trying to identify the best set of abstractions to implement as
  classes
• He chose Perl, and wrote 12 lines of code in as many minutes ...




               Copyright (c) 1999 by Paul Barry, IT Carlow, Kilkenny Road, Carlow, Ireland. All Rights Reserved.
What is Perl not so good at?
• Writing low-level, machine dependent code, such as Device
  Drivers
• Highly compute-intensive, mathematical programs
• Highly optimised, time-critical programs (i.e., real-time,
  embedded)
            Why not use/learn Java?
• Good question! After all, Java is "the programming language of
  the Internet" and this is an Internet course!!
• More interested in learning about networking protocols, as
  opposed to programming languages that target the networking
  world
• Despite what you've heard, Java is not easy to master/learn
• Java is easier than C++, but that doesn't say much
• Java is cool, but, Perl is cooler!
               Copyright (c) 1999 by Paul Barry, IT Carlow, Kilkenny Road, Carlow, Ireland. All Rights Reserved.
Features of Perl
• Support got High-level Data-types
 dynamic list structures
 associative arrays ("hashes")
 strings
 references (a safer, and easier to use, version of C/C++ "pointers")

• Support for Regular Expressions
 sophisticated pattern-matching and replacement operations

• Automatic Memory Management
 no more worrying about malloc, new, free, dispose, delete [], etc., etc.

• Extensible
 OOP support (with Perl 5)
 reusable code base
 modular

• "Low-Level" Features
 possible to interface Perl to other programming languages (C, C++, Java)
 possible to embed the Perl interpreter in a program written in C

                    Copyright (c) 1999 by Paul Barry, IT Carlow, Kilkenny Road, Carlow, Ireland. All Rights Reserved.
Features of Perl (continued)
• Some Controversial Features
 "loose" typing and declarations (no need to pre-define variables)
 "There's more than one way to do it"
 performance can be poor (due to it's interpreted nature)
 "real" computer scientists tend to view Perl with disdain




                    Copyright (c) 1999 by Paul Barry, IT Carlow, Kilkenny Road, Carlow, Ireland. All Rights Reserved.
Perl Documentation
• I recommend a couple of textbooks on the Booklist as found on
  the http://elmo.itcarlow.ie website
• Every Perl distribution comes with complete on-line
  documentation
• On Linux, the "man perl" command introduces the documentation
  available
• The on-line reference material is to be regarded as the ultimate
  authority on what your distribution of Perl supports




               Copyright (c) 1999 by Paul Barry, IT Carlow, Kilkenny Road, Carlow, Ireland. All Rights Reserved.
A Perl Story #2
• A University in the States runs a programming challenge each
  year
• The first year it ran, a student using Perl won, completing the
  challenge in about half the time of any other student (all using
  more traditional programming languages)
• In all subsequent years, Perl programmers have been banned from
  the competition
• The winner from the first year still isn't quite sure what to do with
  his prize - a copy of "Microsoft Visual C++"




                Copyright (c) 1999 by Paul Barry, IT Carlow, Kilkenny Road, Carlow, Ireland. All Rights Reserved.

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
Nikhil Kapoor
 

Was ist angesagt? (20)

Are High Level Programming Languages for Multicore and Safety Critical Conver...
Are High Level Programming Languages for Multicore and Safety Critical Conver...Are High Level Programming Languages for Multicore and Safety Critical Conver...
Are High Level Programming Languages for Multicore and Safety Critical Conver...
 
Getting Started with SQL Server Compact Edition 3.51
Getting Started with SQL Server Compact Edition 3.51Getting Started with SQL Server Compact Edition 3.51
Getting Started with SQL Server Compact Edition 3.51
 
.NET MeetUp Amsterdam 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund
.NET MeetUp Amsterdam 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund.NET MeetUp Amsterdam 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund
.NET MeetUp Amsterdam 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund
 
.NET MeetUp Brno - Challenges of Managing CoreFX repo -- Karel Zikmund
.NET MeetUp Brno - Challenges of Managing CoreFX repo -- Karel Zikmund.NET MeetUp Brno - Challenges of Managing CoreFX repo -- Karel Zikmund
.NET MeetUp Brno - Challenges of Managing CoreFX repo -- Karel Zikmund
 
ctchou-resume
ctchou-resumectchou-resume
ctchou-resume
 
Evolution of programming languages
Evolution of programming languagesEvolution of programming languages
Evolution of programming languages
 
Non-Blocking Strategies for FFI
 Non-Blocking Strategies for FFI Non-Blocking Strategies for FFI
Non-Blocking Strategies for FFI
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
The Roslyn Compiler: Look at Your Code from a Different Perspective (Raffaele...
The Roslyn Compiler: Look at Your Code from a Different Perspective (Raffaele...The Roslyn Compiler: Look at Your Code from a Different Perspective (Raffaele...
The Roslyn Compiler: Look at Your Code from a Different Perspective (Raffaele...
 
CH # 1 preliminaries
CH # 1 preliminariesCH # 1 preliminaries
CH # 1 preliminaries
 
ctchou-resume
ctchou-resumectchou-resume
ctchou-resume
 
.NET MeetUp Prague 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund
.NET MeetUp Prague 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund.NET MeetUp Prague 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund
.NET MeetUp Prague 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund
 
.NET Fringe 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund
.NET Fringe 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund.NET Fringe 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund
.NET Fringe 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund
 
.NET MeetUp Prague 2017 - .NET Standard -- Karel Zikmund
.NET MeetUp Prague 2017 - .NET Standard -- Karel Zikmund.NET MeetUp Prague 2017 - .NET Standard -- Karel Zikmund
.NET MeetUp Prague 2017 - .NET Standard -- Karel Zikmund
 
Principles Of Programing Languages
Principles Of Programing LanguagesPrinciples Of Programing Languages
Principles Of Programing Languages
 
ctchou-resume
ctchou-resumectchou-resume
ctchou-resume
 
Top ten computer languages in 2018
Top ten computer languages in 2018Top ten computer languages in 2018
Top ten computer languages in 2018
 
PDQ Programming Languages plus an overview of Alice - Frank Ducrest
PDQ Programming Languages plus an overview of Alice - Frank DucrestPDQ Programming Languages plus an overview of Alice - Frank Ducrest
PDQ Programming Languages plus an overview of Alice - Frank Ducrest
 
Python Training in Pune
Python Training in PunePython Training in Pune
Python Training in Pune
 
[Dec./2017] My Personal/Professional Journey after Graduate Univ.
[Dec./2017] My Personal/Professional Journey after Graduate Univ.[Dec./2017] My Personal/Professional Journey after Graduate Univ.
[Dec./2017] My Personal/Professional Journey after Graduate Univ.
 

Andere mochten auch

Andere mochten auch (7)

Tutorial%20-%20Content%20Management%20System
Tutorial%20-%20Content%20Management%20SystemTutorial%20-%20Content%20Management%20System
Tutorial%20-%20Content%20Management%20System
 
dr_1
dr_1dr_1
dr_1
 
eureka09
eureka09eureka09
eureka09
 
netbeans
netbeansnetbeans
netbeans
 
User_Manual
User_ManualUser_Manual
User_Manual
 
toc
toctoc
toc
 
IJTC%202009%20JRuby
IJTC%202009%20JRubyIJTC%202009%20JRuby
IJTC%202009%20JRuby
 

Ähnlich wie Intro

Overview new programming languages
Overview new programming languagesOverview new programming languages
Overview new programming languages
umoren
 

Ähnlich wie Intro (20)

Pearl
PearlPearl
Pearl
 
Webinar: Learn Perl - The Jewel of Scripting Languages
Webinar: Learn Perl - The Jewel of Scripting LanguagesWebinar: Learn Perl - The Jewel of Scripting Languages
Webinar: Learn Perl - The Jewel of Scripting Languages
 
December06Bulletin
December06BulletinDecember06Bulletin
December06Bulletin
 
December06Bulletin
December06BulletinDecember06Bulletin
December06Bulletin
 
Perl
PerlPerl
Perl
 
Introduction to Computers, the Internet and the Web
Introduction to Computers, the Internet and the WebIntroduction to Computers, the Internet and the Web
Introduction to Computers, the Internet and the Web
 
introductiontoperl-springpeople-150605065831-lva1-app6891.pptx
introductiontoperl-springpeople-150605065831-lva1-app6891.pptxintroductiontoperl-springpeople-150605065831-lva1-app6891.pptx
introductiontoperl-springpeople-150605065831-lva1-app6891.pptx
 
Overview new programming languages
Overview new programming languagesOverview new programming languages
Overview new programming languages
 
Introduction To Perl - SpringPeople
Introduction To Perl - SpringPeopleIntroduction To Perl - SpringPeople
Introduction To Perl - SpringPeople
 
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
 
Evalution about programming language part 1
Evalution about programming language part 1Evalution about programming language part 1
Evalution about programming language part 1
 
Bioinformatics p1-perl-introduction v2013
Bioinformatics p1-perl-introduction v2013Bioinformatics p1-perl-introduction v2013
Bioinformatics p1-perl-introduction v2013
 
Perl Myths 200909
Perl Myths 200909Perl Myths 200909
Perl Myths 200909
 
groovy & grails - lecture 1
groovy & grails - lecture 1groovy & grails - lecture 1
groovy & grails - lecture 1
 
Le PERL est mort
Le PERL est mortLe PERL est mort
Le PERL est mort
 
Natural Language Processing Tools for the Digital Humanities
Natural Language Processing Tools for the Digital HumanitiesNatural Language Processing Tools for the Digital Humanities
Natural Language Processing Tools for the Digital Humanities
 
Ruby on Rails (RoR) as a back-end processor for Apex
Ruby on Rails (RoR) as a back-end processor for Apex Ruby on Rails (RoR) as a back-end processor for Apex
Ruby on Rails (RoR) as a back-end processor for Apex
 
P1 2018 python
P1 2018 pythonP1 2018 python
P1 2018 python
 
Introduction to perl
Introduction to perlIntroduction to perl
Introduction to perl
 
Lecture 8
Lecture 8Lecture 8
Lecture 8
 

Mehr von tutorialsruby

<img src="../i/r_14.png" />
<img src="../i/r_14.png" /><img src="../i/r_14.png" />
<img src="../i/r_14.png" />
tutorialsruby
 
TopStyle Help & <b>Tutorial</b>
TopStyle Help & <b>Tutorial</b>TopStyle Help & <b>Tutorial</b>
TopStyle Help & <b>Tutorial</b>
tutorialsruby
 
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>
tutorialsruby
 
<img src="../i/r_14.png" />
<img src="../i/r_14.png" /><img src="../i/r_14.png" />
<img src="../i/r_14.png" />
tutorialsruby
 
<img src="../i/r_14.png" />
<img src="../i/r_14.png" /><img src="../i/r_14.png" />
<img src="../i/r_14.png" />
tutorialsruby
 
Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0
tutorialsruby
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
tutorialsruby
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
tutorialsruby
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008
tutorialsruby
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008
tutorialsruby
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
tutorialsruby
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
tutorialsruby
 

Mehr von tutorialsruby (20)

<img src="../i/r_14.png" />
<img src="../i/r_14.png" /><img src="../i/r_14.png" />
<img src="../i/r_14.png" />
 
TopStyle Help & <b>Tutorial</b>
TopStyle Help & <b>Tutorial</b>TopStyle Help & <b>Tutorial</b>
TopStyle Help & <b>Tutorial</b>
 
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>
 
<img src="../i/r_14.png" />
<img src="../i/r_14.png" /><img src="../i/r_14.png" />
<img src="../i/r_14.png" />
 
<img src="../i/r_14.png" />
<img src="../i/r_14.png" /><img src="../i/r_14.png" />
<img src="../i/r_14.png" />
 
Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0
 
xhtml_basics
xhtml_basicsxhtml_basics
xhtml_basics
 
xhtml_basics
xhtml_basicsxhtml_basics
xhtml_basics
 
xhtml-documentation
xhtml-documentationxhtml-documentation
xhtml-documentation
 
xhtml-documentation
xhtml-documentationxhtml-documentation
xhtml-documentation
 
CSS
CSSCSS
CSS
 
CSS
CSSCSS
CSS
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
 
HowTo_CSS
HowTo_CSSHowTo_CSS
HowTo_CSS
 
HowTo_CSS
HowTo_CSSHowTo_CSS
HowTo_CSS
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
 

Kürzlich hochgeladen

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Kürzlich hochgeladen (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 

Intro

  • 1. Perl Tutorial The Practical Extraction Report Language • The premier site for Perl information is: http://www.perl.com • Everything you every wanted to know about Perl, and then some. • Perl is a creation of Larry Wall • Current stable release 5.005_03 Copyright (c) 1999 by Paul Barry, IT Carlow, Kilkenny Road, Carlow, Ireland. All Rights Reserved.
  • 2. What is Perl? • A powerful general-purpose programming language • A high-level, command-driven scripting language What is a Scripting Language? • A programmer/administrator tool designed to allow the bolting together of other software tools to solve a problem - we refer to the resulting programs as scripts • Scripts are very popular within the UNIX and Linux world • Examples of scripting languages include TCL, Python, and AppleScript (and - of course - Perl!). MS-DOS batch files are a very simple, primitive form of scripts • Scripting languages are generally interpreted, as opposed to compiled Copyright (c) 1999 by Paul Barry, IT Carlow, Kilkenny Road, Carlow, Ireland. All Rights Reserved.
  • 3. What makes Perl different? • Easy to learn - yippee! - with very good support for standard programming constructs • Very good at processing and formatting text files (the reason it was created) • Freely available, on many platforms (UNIX, Linux, Mac, PC, Irix, SunOS, Windows, NT, etc., etc.) • Strong support from the Internet developer community • Add-ons available for every conceivable usage - great support for Internet standards and protocols Why do Programmers like Perl? • Lots of reasons ... • Perl gets the job done! Copyright (c) 1999 by Paul Barry, IT Carlow, Kilkenny Road, Carlow, Ireland. All Rights Reserved.
  • 4. A Perl Story #1 • When faced with writing a particularly mundane, but highly necessary, program to process thousands of files, a programmer was faced with choosing a language • If he had had to write the program in C, he would have found an excuse not to • If he had had to write the program in C++/Java, he would still be trying to identify the best set of abstractions to implement as classes • He chose Perl, and wrote 12 lines of code in as many minutes ... Copyright (c) 1999 by Paul Barry, IT Carlow, Kilkenny Road, Carlow, Ireland. All Rights Reserved.
  • 5. What is Perl not so good at? • Writing low-level, machine dependent code, such as Device Drivers • Highly compute-intensive, mathematical programs • Highly optimised, time-critical programs (i.e., real-time, embedded) Why not use/learn Java? • Good question! After all, Java is "the programming language of the Internet" and this is an Internet course!! • More interested in learning about networking protocols, as opposed to programming languages that target the networking world • Despite what you've heard, Java is not easy to master/learn • Java is easier than C++, but that doesn't say much • Java is cool, but, Perl is cooler! Copyright (c) 1999 by Paul Barry, IT Carlow, Kilkenny Road, Carlow, Ireland. All Rights Reserved.
  • 6. Features of Perl • Support got High-level Data-types dynamic list structures associative arrays ("hashes") strings references (a safer, and easier to use, version of C/C++ "pointers") • Support for Regular Expressions sophisticated pattern-matching and replacement operations • Automatic Memory Management no more worrying about malloc, new, free, dispose, delete [], etc., etc. • Extensible OOP support (with Perl 5) reusable code base modular • "Low-Level" Features possible to interface Perl to other programming languages (C, C++, Java) possible to embed the Perl interpreter in a program written in C Copyright (c) 1999 by Paul Barry, IT Carlow, Kilkenny Road, Carlow, Ireland. All Rights Reserved.
  • 7. Features of Perl (continued) • Some Controversial Features "loose" typing and declarations (no need to pre-define variables) "There's more than one way to do it" performance can be poor (due to it's interpreted nature) "real" computer scientists tend to view Perl with disdain Copyright (c) 1999 by Paul Barry, IT Carlow, Kilkenny Road, Carlow, Ireland. All Rights Reserved.
  • 8. Perl Documentation • I recommend a couple of textbooks on the Booklist as found on the http://elmo.itcarlow.ie website • Every Perl distribution comes with complete on-line documentation • On Linux, the "man perl" command introduces the documentation available • The on-line reference material is to be regarded as the ultimate authority on what your distribution of Perl supports Copyright (c) 1999 by Paul Barry, IT Carlow, Kilkenny Road, Carlow, Ireland. All Rights Reserved.
  • 9. A Perl Story #2 • A University in the States runs a programming challenge each year • The first year it ran, a student using Perl won, completing the challenge in about half the time of any other student (all using more traditional programming languages) • In all subsequent years, Perl programmers have been banned from the competition • The winner from the first year still isn't quite sure what to do with his prize - a copy of "Microsoft Visual C++" Copyright (c) 1999 by Paul Barry, IT Carlow, Kilkenny Road, Carlow, Ireland. All Rights Reserved.