Introduction to Perl Programming: Hands-On
Course 431 | 4 Days
Attendee Rating
Evaluations in the Last 12 Months
-
5 stars:
65%

-
4 stars:
31%

-
3 stars:
4%

-
2 stars:
0%

-
1 star:
0%

-
Course Info
You Will Learn How To
- Quickly create effective, reusable Perl scripts
- Structure code with user-generated subroutines
- Exploit the many additional object-oriented packages available on the Internet
- Build real-world scripts that can be used on UNIX, Linux and Win32 platforms
- Solve complex tasks with ease using Perl's many small operators and built-in functions
Hands-On Exercises

- Parsing and manipulating text with Perl regular expressions
- Reading and writing standard I/O streams and data files
- Extracting and arranging information from multiple files
- Empowering scripts with OO modules
- Building network-capable scripts to access e-mail, database and web servers
Course Content
Introduction to Perl
- Perl strengths: flexible, fast, rich, easy-to-use operator set
- Reusable tool building for system admin, text manipulation, the Internet
- Networking, text filtering, web application programming
Perl Syntax Fundamentals
Running Perl programs
- Invoking UNIX/Linux scripts with #! syntax
- Starting Perl scripts under Win32 via command line
Variable types and contexts
- Scalars vs. lists vs. hashes
- Strings and interpolated strings
- Making sense of special variables
- Working in the right context
Compound data structures
- Creating references to anonymous data
- Building multidimensional arrays
- Working with multidimensional hashes
Managing files and user input
- Handling standard I/O streams
- Parsing command line arguments
- Reading and writing data files
Pattern Matching and Operators
Perl regular expressions
- Extracting important text information
- Building on UNIX regular expressions
- Altering data with substitutions
- Performing global and case-insensitive matches
Perl's small operator groups
- Manipulating arithmetic expressions
- Replicating and growing strings
- Saving time with assignment operators
- Making decisions with logical operators
- Establishing and using ranges
Looping, Decisions and Flow Control
Perl support for conventional flow control constructs
- Making decisions with if/else/elsif
- Creating loops with do, while, until, for and foreach
Perl-specific constructs
- if and unless as statement modifiers
- Constructing switch statements
Subroutines
Writing subroutines
- Defining and calling a subroutine
- Passing and receiving parameters
- Returning values to the caller
Making data work for you
- Localising variables: my and local
- Accessing global variables
Built-in and Add-on Functions
Common data manipulation requirements
- String functions for text manipulation
- Processing arrays with list functions
- Arranging information with sort
I/O and tool building
- Manipulating file system entries
- Reading binary file
- Dissecting and creating records with split and join
- Formatting tabular output
Perl and Object Orientation
How Perl implements object orientation
- An introduction to OO in Perl
- Methods, classes and constructors
- Surveying and obtaining third-party packages from CPAN
Accessing OO packages
- Incorporating modules with use
- Defining a schema to employ OO modules
- Calling methods with the -> syntax
- Passing initialisation parameters
Who Should Attend
UNIX, Linux and Windows administrators, software engineers, programmers and power users who have previous experience with a procedural or object-oriented programming language, and who want to augment or replace their existing scripting and regular expression knowledge with Perl.Related Courses
- Developing a Website - Course 470
- XML Comprehensive Introduction - Course 542
- Java Programming Comprehensive Introduction - Course 471
- UNIX and Linux Tools and Utilities - Course 396
- Linux Comprehensive Introduction - Course 143
- SQL Programming Language Introduction - Course 925
- Developing User Requirements - Course 315
Training Hours
First Day Orientation:
8:00 a.m. - 9:00 a.m.Standard Class Hours:
9:00 a.m. - 4:30 p.m.Last Day Class Hours:
9:00 a.m. - 3:30 p.m.Free Optional Course Exam Last Day:
3:45 p.m. - 4:30 p.m.Each Class Day:
Upon Request: Informal discussion with instructor about your work-specific projects or areas of special interest:
4:30 p.m. - 5:00 p.m. -
More Course Info
What is this course about?
This course provides an introduction to the code syntax of Perl, an interpreted programming language. Perl combines the flexibility of general-purpose programming languages such as C or C++ with many of the features of popular UNIX tools such as grep, tr, sed and awk. The result is a language especially suited to performing complex searching and manipulation of text or of data stored in text format.
The flexibility and extensibility of Perl via add-on modules allow it to be readily used to access and manipulate many kinds of non-textual data just as easily.
What background do I need?
We assume that participants have some previous programming experience, with either a procedural or object-oriented language such as Visual Basic, Delphi, C, C++, Java, or a UNIX shell. No previous familiarity with Perl is required.
Who will benefit from this course?
The course is for those who want to learn to write scripts and applications using Perl. Perl has a very rich set of operators, regular expressions and built-in functions, in addition to a terse syntax.
This course is especially designed for people who need to start from very little knowledge, learn the language, and become productive quickly. It's designed to help you over the syntax hurdle by exposing you to that syntax with real-world examples. The course also provides an introduction to Perl's key built-in and library functions and how to use object-oriented features.
Do I need to understand object-oriented programming?
No. Although we demonstrate how to use Perl's object-oriented calling mechanism, we provide a short inline introduction to OO techniques and terminology neccessary to make use of OO Perl modules written by others. This course does not cover writing OO Perl modules or code, but rather how to benefit from existing OO code.
What is Perl used for?
Perl is a programming language whose constructs encourage the rapid development of small, reusable tools. This makes it a perfect language for scripting but it's also often used as the basis for complete applications. Indeed, there are more than 7,700 add-on modules available on the Internet for Perl, covering almost every area of computing!
System administrators in both UNIX and Windows environments can create Perl scripts to automate repetitive system administration tasks such as compiling and manipulating log files, doing nightly backups, or creating customised software loads. Individuals can also write Perl scripts to enhance their productivity in performing tasks such as automatically processing incoming mail, performing large search-and-replace functions across multiple documents, or converting data from report format to the formats required for various spreadsheet applications. Perl is also particularly used to write CGI scripts for Web sites and for producing client/server networking scripts. It is also popular for processing HTML, XML and even binary files.
I don't work in a UNIX environment. Will this course be helpful to me?
Absolutely. While it's true that Perl originated in the UNIX world, Perl can now be found on other platforms including Windows. If you need to use a scripting tool to improve your productivity and you're working in a Windows environment, Perl can serve you well. It provides easy access to the Registry and other Win32 system functions, along with support for sockets and the most powerful text parsing engine of any language. This makes Perl a great choice for scripting across platforms.
The course itself teaches Perl in a platform-neutral way, so we don't specifically cover Win32 extensions or UNIX shared memory functions, for example. Hands-on exercises run identically on both UNIX and Windows, and you have the opportunity to choose your platform or even switch platforms during the course.
How much time is spent on each topic?
Content Hours Introduction to Perl 1.0 Perl syntax fundamentals 5.0 Pattern matching 4.0 Small operators 2.5 Looping, decisions and flow control 2.5 Subroutines 2.5 Built in functions 3.0 References and multi-dimensional arrays 1.0 Using object oriented packages 1.5 Times, including the workshops, are estimates; exact times may vary according to the needs of each class.
How much time is spent on exercises?
This course stresses hands-on practise as the best method for learning Perl syntax, and 30% of the 4-day course is spent on exercises and practical material. Throughout the course concepts are presented and then immediately reinforced in "do now" examples. Additionally, larger exercises let you integrate the concepts you are learning to create scripts of increasing complexity.
I'm attending this course from work using AnyWare - Learning Tree's web-based remote attendance platform. How will that impact what I learn?
You will participate fully in the course and acquire the same knowledge and skills as your classmates who participate in the classroom. You will have the same course materials, be able to easily communicate back and forth and ask questions of your instructors and peers, and you will control an in-classroom workstation dedicated entirely to you. Your instructor will be able to see exactly what you're doing and can interactively offer concrete help.
I already know Perl 4. Is this course for me?
This course is designed for complete newcomers to the Perl 5 language. Even if you already know Perl 4, many changes and additions were made between Perl 4 and Perl 5. Although you may already be conversant with some of the material in the course, it's a good place to learn about powerful Perl 5 features, including:
- References and multidimensional data structures
- A modified and richer regular expression syntax
- Using object-orientation and modules
I'm hoping to develop entire Web applications in Perl. Is this course for me?
As an introduction to the Perl programming language, this course devotes all its class time to covering language and syntax fundamentals. The topic of Web development is too advanced to be included in this course, although later exercises cover some related items such as parsing HTML files, building an LWP web client proxy and creating web pages from template files as real-world examples.
Which text editor is used in this course?
Attendees are not obligated to use a specific text editor in the course. Instead, they may choose the text editor of their preference from the following list: Windows notepad, vi, emacs or the Open Perl IDE. For those using Linux, kwrite, vi, emacs or the Glimmer IDE would be suitable.
How does this course relate to other Learning Tree courses?
Systems administrators interested in using Perl to create productivity tools may also be interested in systems administration courses for their chosen platforms, including:
- 144, Linux® Administration and Support: Hands-On provides the knowledge and skills to install and configure Linux servers for reliability, functionality and performance.
Web developers interested in using Perl to create CGI scripts for their sites may be interested in our Internet-oriented courses, including:
- 470, Developing a Website: Hands-On in which you gain the knowledge and skills to develop a well-designed Web site.
Other courses that may be of interest include:
-
Certification/Credits
Many Learning Tree courses provide college credit and industry continuing education credits. You can also earn a Learning Tree Professional Certification in your area of expertise and prepare for popular industry certifications. For continuing professional development information, click here.
-
Tuition
4-Day Fee New Attendee Returning Attendee Notes Fee Per Course £1,985 Call 0800 282 353 Click here for multi-course savings plans.
Tuition payment is not required at time of enrolment.
Course 431 • 4 Days

Two Ways to Attend Your Course
1. In the classroom -OR-
2. Via the web using AnyWare
Note: AnyWare, our web-based remote attendance platform, lets you participate fully in any scheduled course date below from your workplace or home. For AnyWare enrolments, please register at least 7 days prior to the start of the course.
Course Dates 4 Days
UK Dates
US East Coast Dates
*Work and train on the same day! Attend live US East Coast Courses online from 2pm to 9pm GMT.
Enrol Today – Risk Free!
Call 0800 282 353 or enroll online by selecting your date above.
- No advanced payment required.
- No fees for cancellation or rescheduling, ever.
- Take up to 30 days after your course date to pay.
- Satisfaction guaranteed – or you pay no tuition.
Tuition Fees & Savings Plans
Take advantage of our Multi-Course Tuition Savings Plans. Learn more »
You can bring this course on-site to your organisation
Bring Learning Tree Training to your workplace with our On-Site Training Solution. Learn more ».
"The instructor of the Perl programming course at Learning Tree had the ability to keep the participants focused on the course, and the course was very well structured".
– S. Carnelli
Customer Support
Ericsson AB
People Who Took This Course Also Took







