I've uploaded a further batch of new examples (that makes around 40 in total!) from the private Perl course that I ran from Wednesday through Saturday last week - many of them adding a new twist on to previous examples. If you read a comment below and thing "that's what I'm looking for an example of", then simply click on the code sample name just above, and you'll find a complete source program.
in module P208
Perl's grep function isn't just a regular expression processor - it puts each value into $_ and lets you perform other tests too. And $_ is set as a pointer, so if you alter it you're changing the incoming list. Although it may be regarded as clever, this changing of the incoming variable can be very confusing to the reader and is not recommended!
in module P301
Variables default global in Perl 5.
If you declare a variable as my, it is then lexcially scoped to the block in which it occurs - i.e. only available under that name within the block, and lost at the end (unless a reference to it is used elsewhere).
If you declare a variable as local, any old global variable of the same name is saved away until the end of the current block and a new one created.
Since a local variable is not lexically scoped, it can be used within a sub under its original name, whereas a my variable cannot.
Strong recommendation is to use my rather than local, though there are times you'll want to use local in order to save and restore special variables such as $".
in module P217
You don't have two dimensional arrays in Perl - but you can have "lists of ists". And these are much more flexible!
At first glance, the syntax is complex ... but you'll soon learn that Perl, ever practical, lets you use a shorthand that's the same as you might use to address them as if they were 2 dimensional arrays anyway!
in module P213
in module P213
in module P218
in module P218
You can use a bare word as a function call name provided that you've defined the function (i.e. sub) prior to the compiler finding the word. That means it has to be defined higher in the code, or in a module that's loaded with a use (a require will not suffice!)
You can force a bare word to be a sub call by adding () onto the end of the name, or by adding & before the name.
Perl's warnings (-w) will tell you of any bare words that occur in your code which are not run as subs - "Useless use of a constant in void context".
If you want conditional loading, then use require. It pulls in code at run time rather than compile time ... our example loads one of two different modules depending on whether the second number is odd or even!
in module P303
You don't usually declare a Perl sub with bracketed parameters - but you CAN use a function prototype if you wish. That lets you specify the number and type of parameters that it's called with, and you'll be rejected at compile time if you get the calling code wrong.
in module P218
in module P218
runner.pm is a pair of classes, both descended off a parent class, and with errors reported via the Carp module to make them useful to the calling program. It's a short but heavily featured demo showing polymorphism, inheritance, multiple packages (classes) in a file, and a common AUTOLOADer
in module P212
You can read an entire file into a string by undef-ing $/, or with the read function. And you can then do regular expression matches against the whole string - sometimes that's better than splitting it into a list. Remember not to use $' $` and $& if you want it to be efficient, and remember the m modifier on the regular expression so that ^ and $ will match at embedded new lines!
in module P212
in module P212
Single and double quotes strings ... qw, q and qq ... here documents. You have plenty of choice in defining strings!
Using qr, you can compile a regular expression into a variable, and that's going to be very efficient if it contains variables that change just a few times as you program runs.
in module P303
Some interest functionality:
* caller - tells you about your callin code
* wantarray - tells you if you're in a list context
* ref - tells you whether a variable is a reference, and is so to what sort of collection (or maybe "SCALAR" (written 2010-07-19, updated 2010-07-30)
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articlesP212 - Perl - More on Character Strings 
Binary data handling - Python and Perl - (2015-03-09) 
First match or all matches? Perl Regular Expressions - (2012-11-19) 
Converting codons via Amino Acids to Proteins in Perl - (2012-04-25) 
Possessive Regular Expression Matching - Perl, Objective C and some other languages - (2012-03-12) 
Serialsing and unserialising data for storage and transfer in Perl - (2012-02-28) 
The difference between dot (a.k.a. full stop, period) and comma in Perl - (2011-12-09) 
Single and double quotes strings in Perl - what is the difference? - (2011-08-30) 
DNA to Amino Acid - a sample Perl script - (2011-06-24) 
How much has Perl (and other languages) changed? - (2011-06-10) 
Looking ahead and behind in Regular Expressions - double matching - (2010-12-23) 
Object Orientation in an hour and other Perl Lectures - (2010-11-18) 
Arrays v Lists - what is the difference, why use one or the other - (2010-10-10) 
Unpacking a Perl string into a list - (2010-07-16) 
Teaching examples in Perl - third and final part - (2010-06-27) 
Binary data handling with unpack in Perl - (2010-06-10) 
Want to do a big batch edit? Nothing beats Perl! - (2010-03-01) 
Making variables persistant, pretending a database is a variable and other Perl tricks - (2009-08-27) 
Running a piece of code is like drinking a pint of beer - (2009-06-11) 
Perl substitute - the e modifier - (2008-12-16) 
Finding words and work boundaries (MySQL, Perl, PHP) - (2008-08-03) 
Equality and looks like tests - Perl - (2008-07-29) 
Handling Binary data (.gif file example) in Perl - (2008-01-17) 
Ignore case in Regular Expression - (2007-09-08) 
Regular expressions made easy - building from components - (2007-08-16) 
Substitute operator / modifiers in Perl - (2007-06-28) 
Commenting a Perl Regular Expression - (2007-06-12) 
Perl, the substitute operator s - (2007-06-08) 
Matching within multiline strings, and ignoring case in regular expressions - (2006-11-25) 
C++ and Perl - why did they do it THAT way? - (2006-11-16) 
Coloured text in a terminal from Perl - (2006-05-29) 
Don't expose your regular expressions - (2006-02-15) 
Storing a regular expression in a perl variable - (2006-02-09) 
Perl Regular Expressions - finding the position and length of the match - (2006-02-02) 
Remember to process blank lines - (2006-01-31) 
Commenting Perl regular expressions - (2005-09-30)P213 - Perl - Creating your own Classes 
Classes and object - first steps in Perl 6 - (2016-01-02) 
Learning to use existing classes in Perl - (2012-08-10) 
Learning Object Orientation in Perl through bananas and perhaps Moose - (2010-12-21) 
What does blessing a variable in Perl mean? - (2010-09-24) 
When should I use OO techniques? - (2009-05-11) 
Introduction to Object Oriented Programming - (2008-12-06) 
Object Oriented Perl - First Steps - (2008-11-01) 
Example of OO in Perl - (2008-06-03) 
Object Oriented Programming in Perl - Course - (2007-11-18) 
Perl for Larger Projects - Object Oriented Perl - (2007-08-25) 
Blessing in Perl / Member variable in Ruby - (2006-12-14) 
Answering ALL the delegate's Perl questions - (2006-12-09) 
When to bless a Perl variable - (2005-03-15) 
Bellringing and Programming and Objects and Perl - (2005-02-25)P217 - Perl - More than Simple Lists and Hashes! 
Taking the lead, not the dog, for a walk. - (2012-10-28) 
How to do multidimensional arrays (or rather lists and hashes) in Perl - (2012-01-14) 
Take the dog on a lead - do not carry her. Perl references. - (2011-09-17) 
Not multidimentional arrays - but lists of lists. Much more flexible. Perl! - (2011-08-26) 
From fish, loaves and apples to money, plastic cards and BACS (Perl references explained) - (2011-08-20) 
Arrays of arrays - or 2D arrays. How to program tables. - (2011-01-02) 
Adventure with references to lists and lists of references - (2010-12-26) 
Finding elements common to many lists / arrays - (2010-11-26) 
Setting up a matrix of data (2D array) for processing in your program - (2010-10-21) 
Copying - duplicating data, or just adding a name? Perl and Python compared - (2010-10-12) 
Just pass a pointer - do not duplicate the data - (2010-06-30) 
Perl references - $$var and \$var notations - (2009-06-15) 
Autovivification - the magic appearance of variables in Perl - (2008-01-21) 
Course follow-ups - (2005-04-27) 
Hash of lists in Perl - (2004-09-09)P301 - Variables in Perl 
Introspecion in Perl 6 - (2016-01-02) 
Accessing variables across subroutine boundaries - Perl, Python, Java and Tcl - (2015-01-18) 
Sigils - the characters on the start of variable names in Perl, Ruby and Fortran - (2011-09-10) 
Some more advanced Perl examples from a recent course - (2010-09-27) 
Lead characters on Perl variable names - (2009-08-24) 
Variable Types in Perl - (2008-12-15) 
What is an lvalue? (Perl, C) - (2008-03-18)P303 - Perl - Miscellany 
Returning multiple values from a function call in various languages - a comparison - (2011-02-06) 
Exception handling in Perl - using eval - (2010-10-23) 
Different perl examples - some corners I rarely explore - (2010-07-18) 
Operator overloading - redefining addition and other Perl tricks - (2009-09-27) 
Configuring httpd, or Tomcat, to run CGI scripts in Perl - (2009-06-05)
Some other Articles
Tailoring of courses to meet customers needs - how it worksGetting in touch - Please allow me to see you when you are onlineNight Porter and reception - 24 hours a day?Program for reliability and efficiency - do not duplicate, but rather share and re-useFurther more advanced Perl examplesA long day in Melksham ...Another toot of the trumpetMoved - Melksham Lorry Park