PPI::Prettify makes pretty-printing Perl code as HTML easy
Banish unsightly variable assignments with Method::Signatures
Add subroutine signatures to Perl
Dynamic variable names with a dereferencing block
Perl is remarkably flexible and allows you to achieve all kinds of wizardry with the language. One example of this is using a dereferencing block to use a scalar value as a variable name. This allows you to use variables with dynamic names.
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: <b>logical test</b> ? <b>value if true</b> : <b>value if false</b>.
Upgrade your list printing using field separator variables
A typical way to print every element of an array in Perl is using a foreach loop:
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.