3 arrows

Summer-Ready Savings: Up To $500 Off Training 

closeClose

Perl for System Administration

  • Contact Us For Pricing
  • Reviews star_rate star_rate star_rate star_rate star_half 4055 Ratings
  • Course Code TTPS2647
  • Duration 4.5 days
  • Available Formats Classroom

This course leads the student from the basics of writing and running Perl scripts to more advanced features such as file operations, report writing, the use of regular expressions, working with binary data files, and using the extensive functionality of the standard Perl library. Once these skills are mastered, this intensive course moves into practical tools for automating Linux/Unix system administration. Students will learn how to convert existing bash scripts to Perl, and create new scripts that will safely and securely automate system administration tasks.

Skills Gained

  • Create a working script that gets input from the command line, the keyboard, or a file
  • Use arrays to store and process data from files
  • Create formatted reports
  • Launch external programs
  • Interface with bash scripts
  • Understand and use regular expressions
  • Use the appropriate types of variables and data structures
  • Refactor duplicate code into subroutines and modules
  • Know what is available in the standard library

Who Can Benefit

This course is appropriate for anyone who wants to automate and simplify common system administration tasks with Perl.

Prerequisites

Students should already have a working, user-level knowledge of a Unix-like operating system (Linux, Solaris, Mac OS, e.g.). While not mandatory, basic skills with at least one other programming language are desirable.

Course Details

Getting Started

  • What is Perl?
  • Structure of a Perl program
  • Running a Perl script
  • Checking syntax and warnings
  • Execution of scripts under Unix and Windows

Basic Data and I/O

  • Numeric and Text literals
  • Math operators and expressions
  • Scalar variables
  • Default values
  • Writing to standard output
  • Command line arguments
  • Reading from the standard input

Logic and Loops

  • About flow control
  • The if statement and Boolean values
  • Using unless and elsif
  • Statement modifiers
  • warn() and die()
  • The conditional construct
  • Using while loop and its variants
  • Using the for loop
  • Exiting from loops

Lists and Arrays

  • The list data type
  • Accessing array elements
  • Creating arrays
  • List interpolation
  • Arrays and memory
  • Counting elements
  • Iterating through an array
  • List evaluation
  • Slices and ranges

Reading and writing text files

  • File I/O Overview
  • Opening a file
  • Reading text files
  • Writing to a text file
  • Arrays and file I/O
  • Using the <> operator

List functions

  • Growing and shrinking arrays
  • The split() function
  • Splitting on whitespace
  • Assigning to literal lists
  • The join() function
  • The sort() function
  • Alternate sort keys
  • Reversing an array

Formatting output

  • Report formatting overview
  • Defining report formats
  • The write() function

Hashes

  • Hash overview
  • Creating hashes
  • Hash attributes
  • Testing for existence of elements
  • Deleting hash elements
  • Traversing a hash

References and data structures

  • What is a reference?
  • The two ways to create references
  • References to existing data
  • References to anonymous data
  • Dereferencing scalar, array, and hash references
  • Dereferencing elements of arrays and hashes
  • Multidimensional arrays and other data structures
  • Sorting data structures

Text and Regular Expressions

  • String length
  • String functions and operators
  • Quoting in Perl
  • Regular expressions
  • Advanced pattern matching and substitution

Subroutines and variable scope

  • Understanding packages
  • Package and Lexical variables
  • Localizing builtin variables
  • Declaring and calling subroutines
  • Calling subroutines
  • Passing parameters and returning values

Managing files and directories

  • File attributes
  • Reading a directory
  • Using File::Find
  • Permissions
  • Copying and moving files
  • Renaming and deleting files and directories
  • File test operators

Sys Admin Part 1

  • Environment variables
  • Running external programs
  • User identification
  • Trapping signals
  • Backtick operator
  • Time of day

Shortcuts and defaults

  • Understanding $_
  • shift() with no array specified
  • Text file processing
  • Using grep() and Using map()
  • Command-line options for file processing

Using Modules

  • Perl modules
  • Use vs. require
  • A quick tour
  • Bundled libraries and modules
  • Downloading and installing from CPAN
  • Case study: Using Getopt::Long

Creating Modules

  • Review of subroutines
  • Understanding my () and local ()
  • Packages and the symbol table
  • Mechanics of module creation
  • Exporting subroutines and data
  • Using BEGIN and END
  • Good module design

Classes

  • Perl's approach to Classes
  • Understanding bless
  • Constructors
  • Methods
  • Properties
  • Inheritance

Exception handling

  • Simple exception handling
  • Trapping exceptions
  • Using Carp, Croak, and Cluck
  • Raising exceptions

Sys Admin Part 2

  • Monitoring files
  • Accessing syslog
  • Network information
  • User management

Network Tools

  • Copying files across the network
  • Remote login
  • Grabbing data from the Web

Serializing Data

  • Available tools
  • Storable
  • JSON

Enterprise Development

  • Coding standards
  • Source code tools
  • Core modules
  • Saving time with module-starter
  • Documenting with POD
  • Benchmarking and Profiling
  • Unit testing
  • Distributing and installing modules

When does class start/end?

Classes begin promptly at 9:00 am, and typically end at 5:00 pm.

Does the course schedule include a Lunchbreak?

Lunch is normally an hour long and begins at noon. Coffee, tea, hot chocolate and juice are available all day in the kitchen. Fruit, muffins and bagels are served each morning. There are numerous restaurants near each of our centers, and some popular ones are indicated on the Area Map in the Student Welcome Handbooks - these can be picked up in the lobby or requested from one of our ExitCertified staff.

How can someone reach me during class?

If someone should need to contact you while you are in class, please have them call the center telephone number and leave a message with the receptionist.

What languages are used to deliver training?

Most courses are conducted in English, unless otherwise specified. Some courses will have the word "FRENCH" marked in red beside the scheduled date(s) indicating the language of instruction.

What does GTR stand for?

GTR stands for Guaranteed to Run; if you see a course with this status, it means this event is confirmed to run. View our GTR page to see our full list of Guaranteed to Run courses.

Does ExitCertified deliver group training?

Yes, we provide training for groups, individuals and private on sites. View our group training page for more information.

Does ExitCertified deliver group training?

Yes, we provide training for groups, individuals, and private on sites. View our group training page for more information.

I thought the course was informative and the tools to go over the material were very nice.

Overall ExitCertified is a great training provider and the remote learning is as effective as in person.

I was very satisfied about how the course was organized. Sean Did a very good work

Great company -- easy to sign up and very organized. Loved my teacher and class overall.

The tool provided to practice the course teachings is very functional and easy to use.

0 options available

There are currently no scheduled dates for this course. If you are interested in this course, request a course date with the links above. We can also contact you when the course is scheduled in your area.

Contact Us 1-800-803-3948
Contact Us
FAQ Get immediate answers to our most frequently asked qestions. View FAQs arrow_forward