VARIABLES, DATA, AND OBJECTS
Within Perl we have a number of distinct variable types, starting with the basic scalar and moving up through the array of scalars (or just simply an array) to the hash (or associative array of scalars). There are some other basic types such as the filehandle (which has now largely been replaced by IO::Handle) and the all encompassing typeglob.
Objects are created by using a reference to one of the base data types and then using the bless function to associate the reference with a particular package (and therefore by association into a particular class).
Perl uses a large number of operators and functions in order to support the base data types. Many of these are compatible with the different base types, but operations ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access