How To Enable Variable References in Perl While Using Strict

Author: , August 4th, 2019

I wanted to call a sub-routine based on a variable in Perl, like this:

but it failed because of use strict:

To enable using a variable as a reference, simply specify that to Perl:

How To Pass Hashes As Subroutine Arguments In Perl

Author: , August 19th, 2011

A small step forwards in understanding how Perl handles hashes as arguments. This biggest difference is that the first way “slurps” in ALL passed values in @_ into the %args hash. The second (cooler) way, pulls in the arguments hash as a single scalar variable, allowing multiple variables to be passed via @_, if you […]

How To Access Value Directly From A Hash Returned By A Perl Subroutine

Author: , May 5th, 2011