SlideShare a Scribd company logo
1 of 7
Download to read offline
NodeTop, Next:Preface, Previous:(dir), Up:(dir)
    Preface:
    Overview of Perl:
    Scalars:
    Arrays:
    Control Structures:
    Associative Arrays (Hashes):
    Advanced Control Structures:
    Input and Output:
    Regular Expressions:
    Subroutines:
    File Input and Output:
    Directories:
    File System Manipulation:
    Formats:
    Using Modules:
    Going Further:
    General Index:

      --- The Detailed Node Listing ---

      Preface
      Purpose of this Book:
      Contributors:
      Obtaining the Most Recent Version:
      Audience: Who should read this book?
      Material Covered: What does this book cover?
      Conventions Used in this Book: How do I read this book?
      Where to Find Perl Information: Where can I get more information?

      Overview of Perl
      Perl Background: History and Philosophy of Perl.
      A First Perl Program: A Simple Example.
      Running Perl on Your System: How to run Perl.
      Expression Evaluation: How Perl expressions are evaluated.
      Overview Exercises: Exercises to learn from.

      Perl Background
      The History of Perl: Historical information on Perl.
      Perl as a Natural Language: How Perl can be considered a ``natural language''.
      The Slogans: Some common sayings that might help a new programmer understand Perl.

      Running Perl on Your System
      Perl on a Unix-like System: Using Perl in a Unix-like environment.
      Perl on a Microsoft Windows System: Using Perl on a Microsoft system.
      The Online Perl Documentation: Finding the documentation that comes with Perl.




                                                                                            Page 1
   Scalars
   Strings: Using strings of characters in Perl.
   Numbers: Using numerical values in Perl.
   Scalar Variables: Storing scalar data into variables.
   Operators: Operators that work on scalar data.
   Output of Scalar Data:
   Special Variables: Special scalar variables to be aware of.
   Summary of Scalar Operators:
   Scalar Exercises: Exercises to learn from.

   Strings
   Single-quoted Strings:
   A Digression---The print Function:
   Double-quoted Strings:
   Here Document Strings:

   Single-quoted Strings
   Special Characters in Single-quoted Strings:
   Newlines in Single-quoted Strings:
   Examples of Illegal Single-quoted Strings:

   Double-quoted Strings
   Interpolation in Double-quoted Strings:
   Examples of Interpolation:
   Examples of Interpolation (ASCII Octal Values):
   Examples of Interpolation (ASCII Hex Values):
   Characters Requiring Special Consideration:

   Numbers
   Numeric Literals: Numeric values in Perl

   Numeric Literals
   Printing Numeric Literals: Using print with numeric literals

   Scalar Variables
   Scalar Interpolation: Expanding scalar variables in double-quoted strings
   Undefined Variables: Before a Variable has a value, It is undefined

   Operators
   Numerical Operators: Operators for numeric scalars
   Comparison Operators: Operators to compare scalars with each other
   Auto-Increment and Decrement:
   String Operators: Operators for string scalars

   Arrays
   The Semantics of Arrays:
   List Literals:
   Array Variables:



                                                                                Page 2
   Manipulating Arrays and Lists:
   Array Exercises:

   Array Variables
   Using Array Variables:
   Associated Scalars:

   Manipulating Arrays and Lists
   It Slices!:
   Functions:
   The Context (List vs. Scalar):
   Array Interpolation:

   Functions
   Arrays as Stacks:
   Arrays as Queues:

   Control Structures
   Blocks:
   A Digression---Truth Values:
   The if/unless Structures:
   The while/until Structures:
   The do while/until Structures:
   The for Structure:
   The foreach Structure:
   Control Structure Exercises:

   Associative Arrays (Hashes)
   What Is It?:
   Hash Variables:
   Hash Literals:
   Hash Functions:
   Slices:
   Context Considerations:
   Hash Exercises:

   Functions
   Keys and Values:
   Each:

   Advanced Control Structures
   last and next:
   redo:
   Labeled Blocks:
   Expression Modifiers and Boolean Structures:
   Advanced Control Structure Exercises:

   Input and Output



                                                   Page 3
   STDOUT:
   STDIN:
   STDERR:
   Reading Input:
   Printing and Output:
   Special Variables for I/O:
   I/O Exercises:

   Regular Expressions
   The Theory Behind It All:
   The Simple:
   Pattern Matching:
   Regular Expression Shortcuts:
   Regular Expression Exercises:

   The Simple
   Simple Characters:
   The * Special Character:
   The . Character:
   The | Character:
   Grouping with ()s:
   The Anchor Characters:

   Subroutines
   Defining Subroutines:
   Returning Values:
   Using Arguments:
   Dynamic vs. Lexical Scoping:
   Subroutine Exercises:

   File Input and Output
   Filehandles:
   Open and Close:
   Easy Input and Output with Filehandles:
   File Tests:
   The stat Function:
   File I/O Exercises:

   Directories
   Moving Around:
   Globbing:
   Directory Handles:
   Reading Directory Information:
   Directory Exercises:

   File System Manipulation
   Renaming and Removing:
   Creation:



                                              Page 4
   Permissions:
       Timestamps:
       File System Exercises:

       Formats
       Format Exercises:

       Using Modules
       The use Pragma:
       Importing Functions:
       Controlling What Is Imported:
       A Module Example (CGI.pm):
       Useful Default Modules:
       Downloading and Installing CPAN Modules:


NodePreface, Next:Overview of Perl, Previous:Top, Up:Top



  Preface
       Purpose of this Book:
       Contributors:
       Obtaining the Most Recent Version:
       Audience: Who should read this book?
       Material Covered: What does this book cover?
       Conventions Used in this Book: How do I read this book?
       Where to Find Perl Information: Where can I get more information?


NodePurpose of this Book, Next:Contributors, Previous:Preface, Up:Preface


 Purpose of this Book
 This book has been created for a number of reasons. The primary reason is to provide a freely
redistributable tutorial for the Perl language. In writing a freely redistributable tutorial, it is our hope that
the largest number of people can have access to it and share it.

We are a community of Perl programmers. We have discovered ways to save time and money by writing
Perl programs that make our jobs and lives easier. Surely, Perl is not a panacea, but it has certainly made
our lives a little bit easier. It is our hope that you can use Perl to make your jobs and lives easier.


NodeContributors, Next:Obtaining the Most Recent Version, Previous:Purpose of this Book, Up:
Preface


 Contributors
Bradley M. Kuhn (bkuhn@ebb.org) served as "pumpking" (aka editor) for the first edition of this book.



                                                                                                                    Page 5
In addition, he wrote most of the chapters for the first edition.

Greg Bacon (gbacon@cs.uah.edu) was the first to provide grammar and error correcting patches to the
early, pre-release editions.


NodeObtaining the Most Recent Version, Next:Audience, Previous:Contributors, Up:Preface


 Obtaining the Most Recent Version
This book is still under development. The most recent version can be obtained at
http://www.ebb.org/PickingUpPerl.


NodeAudience, Next:Material Covered, Previous:Obtaining the Most Recent Version, Up:Preface


 Audience
 This book is designed for readers who are already competent programmers. Perl is a wonderful
programming language, but is really not the best choice for a first programming language. Since that is the
case, we have chosen to write this book for the audience of those who are already familiar with general
programming concepts, but are completely new to Perl.

This book does not that assume any prior knowledge of Perl. However, a reader familiar with standard
computer science concepts such as abstraction, stacks, queues, and hash tables will definitely find her
way through this book with ease. In other words, anyone with a knowledge equivalent to a first-year of
college computer science courses should find this book very basic, and those of less experience may find
it much more challenging.


NodeMaterial Covered, Next:Conventions Used in this Book, Previous:Audience, Up:Preface


 Material Covered
 The material covered in this book is designed to prepare the reader to enter the world of Perl
programming. This book covers the basic data and control structures of Perl, as well as the philosophies
behind Perl programming. The native search patterns used in Perl, called regular expressions, are
introduced and discussed. The basics of input and output and file system manipulation in Perl are
explained. Finally, a "real world" example of working with and using modules that other programmers
have written is given.


NodeConventions Used in this Book, Next:Where to Find Perl Information, Previous:Material Covered,
Up:Preface


 Conventions Used in this Book
In this text, a variety of conventions will be used to explain the material. Certain typographical and
display elements will be used for didactic purposes.



                                                                                                              Page 6
Any Perl code that is included directly in flowing text appears like this: code. Any operating system
commands or files that are discussed directly in the flowing text appear like this: file. When a particularly
term of importance is first introduced, they appear in emphasized text, like this: an important term.

When Perl code examples or operating system commands need to be separated away from the flowing
text for emphasis, or because the code is long, it appears like this:
my $x = "foo";           # This is a Perl assignment
p




                                                                                                                Page 7

More Related Content

What's hot

Service-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMixService-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMixBruce Snyder
 
Introducing RaveJS: Spring Boot concepts for JavaScript applications
Introducing RaveJS: Spring Boot concepts for JavaScript applicationsIntroducing RaveJS: Spring Boot concepts for JavaScript applications
Introducing RaveJS: Spring Boot concepts for JavaScript applicationsJohn Hann
 
O que há de novo no Rails 3
O que há de novo no Rails 3O que há de novo no Rails 3
O que há de novo no Rails 3Hugo Baraúna
 
Converting Your Dev Environment to a Docker Stack - php[world]
Converting Your Dev Environment to a Docker Stack - php[world]Converting Your Dev Environment to a Docker Stack - php[world]
Converting Your Dev Environment to a Docker Stack - php[world]Dana Luther
 
Introduction to Ruby on Rails
Introduction to Ruby on RailsIntroduction to Ruby on Rails
Introduction to Ruby on RailsManoj Kumar
 
Web Development with Python and Django
Web Development with Python and DjangoWeb Development with Python and Django
Web Development with Python and DjangoMichael Pirnat
 
Service Oriented Integration with ServiceMix
Service Oriented Integration with ServiceMixService Oriented Integration with ServiceMix
Service Oriented Integration with ServiceMixghessler
 
Apache httpd-2.4 : Watch out cloud!
Apache httpd-2.4 : Watch out cloud!Apache httpd-2.4 : Watch out cloud!
Apache httpd-2.4 : Watch out cloud!Jim Jagielski
 
Service Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMixService Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMixBruce Snyder
 
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory CourseRuby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Coursepeter_marklund
 
Converting Your Dev Environment to a Docker Stack - Cascadia
Converting Your Dev Environment to a Docker Stack - CascadiaConverting Your Dev Environment to a Docker Stack - Cascadia
Converting Your Dev Environment to a Docker Stack - CascadiaDana Luther
 
CMake: Improving Software Quality and Process
CMake: Improving Software Quality and ProcessCMake: Improving Software Quality and Process
CMake: Improving Software Quality and ProcessMarcus Hanwell
 
TorqueBox: The beauty of Ruby with the power of JBoss. Presented at Devnexus...
TorqueBox: The beauty of Ruby with the power of JBoss.  Presented at Devnexus...TorqueBox: The beauty of Ruby with the power of JBoss.  Presented at Devnexus...
TorqueBox: The beauty of Ruby with the power of JBoss. Presented at Devnexus...bobmcwhirter
 
Ruby on Rails Training - Module 1
Ruby on Rails Training - Module 1Ruby on Rails Training - Module 1
Ruby on Rails Training - Module 1Mark Menard
 

What's hot (20)

Os Harkins
Os HarkinsOs Harkins
Os Harkins
 
Service-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMixService-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMix
 
Introducing RaveJS: Spring Boot concepts for JavaScript applications
Introducing RaveJS: Spring Boot concepts for JavaScript applicationsIntroducing RaveJS: Spring Boot concepts for JavaScript applications
Introducing RaveJS: Spring Boot concepts for JavaScript applications
 
O que há de novo no Rails 3
O que há de novo no Rails 3O que há de novo no Rails 3
O que há de novo no Rails 3
 
Os Bunce
Os BunceOs Bunce
Os Bunce
 
Converting Your Dev Environment to a Docker Stack - php[world]
Converting Your Dev Environment to a Docker Stack - php[world]Converting Your Dev Environment to a Docker Stack - php[world]
Converting Your Dev Environment to a Docker Stack - php[world]
 
Introduction to Ruby on Rails
Introduction to Ruby on RailsIntroduction to Ruby on Rails
Introduction to Ruby on Rails
 
Web Development with Python and Django
Web Development with Python and DjangoWeb Development with Python and Django
Web Development with Python and Django
 
Service Oriented Integration with ServiceMix
Service Oriented Integration with ServiceMixService Oriented Integration with ServiceMix
Service Oriented Integration with ServiceMix
 
Ndp Slides
Ndp SlidesNdp Slides
Ndp Slides
 
Apache servicemix1
Apache servicemix1Apache servicemix1
Apache servicemix1
 
Cmake
CmakeCmake
Cmake
 
Apache httpd-2.4 : Watch out cloud!
Apache httpd-2.4 : Watch out cloud!Apache httpd-2.4 : Watch out cloud!
Apache httpd-2.4 : Watch out cloud!
 
Service Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMixService Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMix
 
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory CourseRuby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
 
Converting Your Dev Environment to a Docker Stack - Cascadia
Converting Your Dev Environment to a Docker Stack - CascadiaConverting Your Dev Environment to a Docker Stack - Cascadia
Converting Your Dev Environment to a Docker Stack - Cascadia
 
Debugging on rails
Debugging on railsDebugging on rails
Debugging on rails
 
CMake: Improving Software Quality and Process
CMake: Improving Software Quality and ProcessCMake: Improving Software Quality and Process
CMake: Improving Software Quality and Process
 
TorqueBox: The beauty of Ruby with the power of JBoss. Presented at Devnexus...
TorqueBox: The beauty of Ruby with the power of JBoss.  Presented at Devnexus...TorqueBox: The beauty of Ruby with the power of JBoss.  Presented at Devnexus...
TorqueBox: The beauty of Ruby with the power of JBoss. Presented at Devnexus...
 
Ruby on Rails Training - Module 1
Ruby on Rails Training - Module 1Ruby on Rails Training - Module 1
Ruby on Rails Training - Module 1
 

Viewers also liked (6)

YouDrup_in_Drupal
YouDrup_in_DrupalYouDrup_in_Drupal
YouDrup_in_Drupal
 
backend
backendbackend
backend
 
newperl5
newperl5newperl5
newperl5
 
d_vbp_print
d_vbp_printd_vbp_print
d_vbp_print
 
hw1a
hw1ahw1a
hw1a
 
TemplateTutorial
TemplateTutorialTemplateTutorial
TemplateTutorial
 

Similar to Perl%20Tutorial.!Picking%20Up%20Perl

Modules of the twenties
Modules of the twentiesModules of the twenties
Modules of the twentiesPuppet
 
Introduction to Linux Slides.pptx
Introduction to Linux Slides.pptxIntroduction to Linux Slides.pptx
Introduction to Linux Slides.pptxhazhamina
 
What we can learn from Rebol?
What we can learn from Rebol?What we can learn from Rebol?
What we can learn from Rebol?lichtkind
 
presentation_intro_to_python
presentation_intro_to_pythonpresentation_intro_to_python
presentation_intro_to_pythongunanandJha2
 
presentation_intro_to_python_1462930390_181219.ppt
presentation_intro_to_python_1462930390_181219.pptpresentation_intro_to_python_1462930390_181219.ppt
presentation_intro_to_python_1462930390_181219.pptMohitChaudhary637683
 
Lpi Part 2 Basic Administration
Lpi Part 2 Basic AdministrationLpi Part 2 Basic Administration
Lpi Part 2 Basic AdministrationYemenLinux
 
OOP, Networking, Linux/Unix
OOP, Networking, Linux/UnixOOP, Networking, Linux/Unix
OOP, Networking, Linux/UnixNovita Sari
 
The Why and What of Pattern Lab
The Why and What of Pattern LabThe Why and What of Pattern Lab
The Why and What of Pattern LabDave Olsen
 
web programming Unit VI PPT by Bhavsingh Maloth
web programming Unit VI PPT  by Bhavsingh Malothweb programming Unit VI PPT  by Bhavsingh Maloth
web programming Unit VI PPT by Bhavsingh MalothBhavsingh Maloth
 
Managing JSON Deliverables with Fuzzy String-Matching Logic and the Path Reader
Managing JSON Deliverables with Fuzzy String-Matching Logic and the Path ReaderManaging JSON Deliverables with Fuzzy String-Matching Logic and the Path Reader
Managing JSON Deliverables with Fuzzy String-Matching Logic and the Path ReaderSafe Software
 
Summer Training Project On Python Programming
Summer Training Project On Python ProgrammingSummer Training Project On Python Programming
Summer Training Project On Python ProgrammingKAUSHAL KUMAR JHA
 
SF Python Meetup: TextRank in Python
SF Python Meetup: TextRank in PythonSF Python Meetup: TextRank in Python
SF Python Meetup: TextRank in PythonPaco Nathan
 
Aidan's PhD Viva
Aidan's PhD VivaAidan's PhD Viva
Aidan's PhD VivaAidan Hogan
 

Similar to Perl%20Tutorial.!Picking%20Up%20Perl (20)

Modules of the twenties
Modules of the twentiesModules of the twenties
Modules of the twenties
 
Introduction to Linux Slides.pptx
Introduction to Linux Slides.pptxIntroduction to Linux Slides.pptx
Introduction to Linux Slides.pptx
 
What we can learn from Rebol?
What we can learn from Rebol?What we can learn from Rebol?
What we can learn from Rebol?
 
presentation_intro_to_python
presentation_intro_to_pythonpresentation_intro_to_python
presentation_intro_to_python
 
presentation_intro_to_python_1462930390_181219.ppt
presentation_intro_to_python_1462930390_181219.pptpresentation_intro_to_python_1462930390_181219.ppt
presentation_intro_to_python_1462930390_181219.ppt
 
Lpi Part 2 Basic Administration
Lpi Part 2 Basic AdministrationLpi Part 2 Basic Administration
Lpi Part 2 Basic Administration
 
OOP, Networking, Linux/Unix
OOP, Networking, Linux/UnixOOP, Networking, Linux/Unix
OOP, Networking, Linux/Unix
 
The Why and What of Pattern Lab
The Why and What of Pattern LabThe Why and What of Pattern Lab
The Why and What of Pattern Lab
 
The Bund language
The Bund languageThe Bund language
The Bund language
 
web programming Unit VI PPT by Bhavsingh Maloth
web programming Unit VI PPT  by Bhavsingh Malothweb programming Unit VI PPT  by Bhavsingh Maloth
web programming Unit VI PPT by Bhavsingh Maloth
 
Managing JSON Deliverables with Fuzzy String-Matching Logic and the Path Reader
Managing JSON Deliverables with Fuzzy String-Matching Logic and the Path ReaderManaging JSON Deliverables with Fuzzy String-Matching Logic and the Path Reader
Managing JSON Deliverables with Fuzzy String-Matching Logic and the Path Reader
 
Summer Training Project On Python Programming
Summer Training Project On Python ProgrammingSummer Training Project On Python Programming
Summer Training Project On Python Programming
 
Linux programming - Getting self started
Linux programming - Getting self started Linux programming - Getting self started
Linux programming - Getting self started
 
Avro
AvroAvro
Avro
 
Parser
ParserParser
Parser
 
SF Python Meetup: TextRank in Python
SF Python Meetup: TextRank in PythonSF Python Meetup: TextRank in Python
SF Python Meetup: TextRank in Python
 
Files in Python.pptx
Files in Python.pptxFiles in Python.pptx
Files in Python.pptx
 
Files in Python.pptx
Files in Python.pptxFiles in Python.pptx
Files in Python.pptx
 
PYTHON PPT.pptx
PYTHON PPT.pptxPYTHON PPT.pptx
PYTHON PPT.pptx
 
Aidan's PhD Viva
Aidan's PhD VivaAidan's PhD Viva
Aidan's PhD Viva
 

More from 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 – INS0tutorialsruby
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269tutorialsruby
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269tutorialsruby
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008tutorialsruby
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008tutorialsruby
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheetstutorialsruby
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheetstutorialsruby
 

More from 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
 

Recently uploaded

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 

Recently uploaded (20)

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

Perl%20Tutorial.!Picking%20Up%20Perl

  • 1. NodeTop, Next:Preface, Previous:(dir), Up:(dir)  Preface:  Overview of Perl:  Scalars:  Arrays:  Control Structures:  Associative Arrays (Hashes):  Advanced Control Structures:  Input and Output:  Regular Expressions:  Subroutines:  File Input and Output:  Directories:  File System Manipulation:  Formats:  Using Modules:  Going Further:  General Index:  --- The Detailed Node Listing ---  Preface  Purpose of this Book:  Contributors:  Obtaining the Most Recent Version:  Audience: Who should read this book?  Material Covered: What does this book cover?  Conventions Used in this Book: How do I read this book?  Where to Find Perl Information: Where can I get more information?  Overview of Perl  Perl Background: History and Philosophy of Perl.  A First Perl Program: A Simple Example.  Running Perl on Your System: How to run Perl.  Expression Evaluation: How Perl expressions are evaluated.  Overview Exercises: Exercises to learn from.  Perl Background  The History of Perl: Historical information on Perl.  Perl as a Natural Language: How Perl can be considered a ``natural language''.  The Slogans: Some common sayings that might help a new programmer understand Perl.  Running Perl on Your System  Perl on a Unix-like System: Using Perl in a Unix-like environment.  Perl on a Microsoft Windows System: Using Perl on a Microsoft system.  The Online Perl Documentation: Finding the documentation that comes with Perl. Page 1
  • 2. Scalars  Strings: Using strings of characters in Perl.  Numbers: Using numerical values in Perl.  Scalar Variables: Storing scalar data into variables.  Operators: Operators that work on scalar data.  Output of Scalar Data:  Special Variables: Special scalar variables to be aware of.  Summary of Scalar Operators:  Scalar Exercises: Exercises to learn from.  Strings  Single-quoted Strings:  A Digression---The print Function:  Double-quoted Strings:  Here Document Strings:  Single-quoted Strings  Special Characters in Single-quoted Strings:  Newlines in Single-quoted Strings:  Examples of Illegal Single-quoted Strings:  Double-quoted Strings  Interpolation in Double-quoted Strings:  Examples of Interpolation:  Examples of Interpolation (ASCII Octal Values):  Examples of Interpolation (ASCII Hex Values):  Characters Requiring Special Consideration:  Numbers  Numeric Literals: Numeric values in Perl  Numeric Literals  Printing Numeric Literals: Using print with numeric literals  Scalar Variables  Scalar Interpolation: Expanding scalar variables in double-quoted strings  Undefined Variables: Before a Variable has a value, It is undefined  Operators  Numerical Operators: Operators for numeric scalars  Comparison Operators: Operators to compare scalars with each other  Auto-Increment and Decrement:  String Operators: Operators for string scalars  Arrays  The Semantics of Arrays:  List Literals:  Array Variables: Page 2
  • 3. Manipulating Arrays and Lists:  Array Exercises:  Array Variables  Using Array Variables:  Associated Scalars:  Manipulating Arrays and Lists  It Slices!:  Functions:  The Context (List vs. Scalar):  Array Interpolation:  Functions  Arrays as Stacks:  Arrays as Queues:  Control Structures  Blocks:  A Digression---Truth Values:  The if/unless Structures:  The while/until Structures:  The do while/until Structures:  The for Structure:  The foreach Structure:  Control Structure Exercises:  Associative Arrays (Hashes)  What Is It?:  Hash Variables:  Hash Literals:  Hash Functions:  Slices:  Context Considerations:  Hash Exercises:  Functions  Keys and Values:  Each:  Advanced Control Structures  last and next:  redo:  Labeled Blocks:  Expression Modifiers and Boolean Structures:  Advanced Control Structure Exercises:  Input and Output Page 3
  • 4. STDOUT:  STDIN:  STDERR:  Reading Input:  Printing and Output:  Special Variables for I/O:  I/O Exercises:  Regular Expressions  The Theory Behind It All:  The Simple:  Pattern Matching:  Regular Expression Shortcuts:  Regular Expression Exercises:  The Simple  Simple Characters:  The * Special Character:  The . Character:  The | Character:  Grouping with ()s:  The Anchor Characters:  Subroutines  Defining Subroutines:  Returning Values:  Using Arguments:  Dynamic vs. Lexical Scoping:  Subroutine Exercises:  File Input and Output  Filehandles:  Open and Close:  Easy Input and Output with Filehandles:  File Tests:  The stat Function:  File I/O Exercises:  Directories  Moving Around:  Globbing:  Directory Handles:  Reading Directory Information:  Directory Exercises:  File System Manipulation  Renaming and Removing:  Creation: Page 4
  • 5. Permissions:  Timestamps:  File System Exercises:  Formats  Format Exercises:  Using Modules  The use Pragma:  Importing Functions:  Controlling What Is Imported:  A Module Example (CGI.pm):  Useful Default Modules:  Downloading and Installing CPAN Modules: NodePreface, Next:Overview of Perl, Previous:Top, Up:Top Preface  Purpose of this Book:  Contributors:  Obtaining the Most Recent Version:  Audience: Who should read this book?  Material Covered: What does this book cover?  Conventions Used in this Book: How do I read this book?  Where to Find Perl Information: Where can I get more information? NodePurpose of this Book, Next:Contributors, Previous:Preface, Up:Preface Purpose of this Book This book has been created for a number of reasons. The primary reason is to provide a freely redistributable tutorial for the Perl language. In writing a freely redistributable tutorial, it is our hope that the largest number of people can have access to it and share it. We are a community of Perl programmers. We have discovered ways to save time and money by writing Perl programs that make our jobs and lives easier. Surely, Perl is not a panacea, but it has certainly made our lives a little bit easier. It is our hope that you can use Perl to make your jobs and lives easier. NodeContributors, Next:Obtaining the Most Recent Version, Previous:Purpose of this Book, Up: Preface Contributors Bradley M. Kuhn (bkuhn@ebb.org) served as "pumpking" (aka editor) for the first edition of this book. Page 5
  • 6. In addition, he wrote most of the chapters for the first edition. Greg Bacon (gbacon@cs.uah.edu) was the first to provide grammar and error correcting patches to the early, pre-release editions. NodeObtaining the Most Recent Version, Next:Audience, Previous:Contributors, Up:Preface Obtaining the Most Recent Version This book is still under development. The most recent version can be obtained at http://www.ebb.org/PickingUpPerl. NodeAudience, Next:Material Covered, Previous:Obtaining the Most Recent Version, Up:Preface Audience This book is designed for readers who are already competent programmers. Perl is a wonderful programming language, but is really not the best choice for a first programming language. Since that is the case, we have chosen to write this book for the audience of those who are already familiar with general programming concepts, but are completely new to Perl. This book does not that assume any prior knowledge of Perl. However, a reader familiar with standard computer science concepts such as abstraction, stacks, queues, and hash tables will definitely find her way through this book with ease. In other words, anyone with a knowledge equivalent to a first-year of college computer science courses should find this book very basic, and those of less experience may find it much more challenging. NodeMaterial Covered, Next:Conventions Used in this Book, Previous:Audience, Up:Preface Material Covered The material covered in this book is designed to prepare the reader to enter the world of Perl programming. This book covers the basic data and control structures of Perl, as well as the philosophies behind Perl programming. The native search patterns used in Perl, called regular expressions, are introduced and discussed. The basics of input and output and file system manipulation in Perl are explained. Finally, a "real world" example of working with and using modules that other programmers have written is given. NodeConventions Used in this Book, Next:Where to Find Perl Information, Previous:Material Covered, Up:Preface Conventions Used in this Book In this text, a variety of conventions will be used to explain the material. Certain typographical and display elements will be used for didactic purposes. Page 6
  • 7. Any Perl code that is included directly in flowing text appears like this: code. Any operating system commands or files that are discussed directly in the flowing text appear like this: file. When a particularly term of importance is first introduced, they appear in emphasized text, like this: an important term. When Perl code examples or operating system commands need to be separated away from the flowing text for emphasis, or because the code is long, it appears like this: my $x = "foo"; # This is a Perl assignment p Page 7