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

Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
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 WorkerThousandEyes
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 

Recently uploaded (20)

Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
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
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 

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