Use the logical-or and defined-or operators to provide default subroutine variable behaviour
Perl subroutines do not have signatures so variables must be initialized and arguments assigned to them inside the subroutine code. This article describes two useful shortcuts that can simplify this process.
Read it
The conditional (ternary) operator
One way to reduce the verbosity of Perl code is to replace if-else statements with a conditional operator expression. The conditional operator (aka ternary operator) takes the form: logical test ? value if true : value if false.
Read it
List shortcuts: qw the quote whitespace operator
A popular way to build a list of literal quotes in Perl is to use the quote whitespace operator (qw). It’s terse, versatile and elegant. To see why, let’s look at a typical statement using a list of strings:
Read it
Repeat strings with the repetition operator Repeat strings with the repetition operator
You get the idea - Perl has a repetition operator (x) that repeats the scalar or list on its left by the number on it’s right (like multiplication).
Read it
Perl string functions - concatenate substring and split
Perl has many string functions, let’s take a look at a some of the most common ones: concatenate, substring and split.
Read it
Quoting strings in Perl - even ones containing apostrophes and quote or speech marks
Broadly speaking Perl has two types of strings: quotes that are interpolated at runtime and literal quotes that are not interpolated. Let’s review each of these in turn.