Introducing Perl Data Types – Will Braswell



Introducing Perl Data Types – Will Braswell

Introducing Perl Data Types - Will Braswell

Data types are hints to a computer language, telling the language’s interpreter or compiler how best to allocate resources and optimize performance.

We will introduce the type system provided by the Perl compiler, and the many benefits of utilizing Perl data types.
Let’s explore types together!

The Perl interpreter itself is written in C, and implements data types for its own internal use, including:
IV, integer value
NV, number value
PV, pointer value AKA string
AV, array value
HV, hash value
SV, scalar value
RV, reference value
The Perl interpreter does not provide programmers with access to these pre-defined types, and instead it encourages us not to use data types at all.
Perl does allow programmers to create user-defined data types, but none of the (numerous & incompatible) data type systems actually utilizes the underlying C data types implemented in the Perl interpreter.
The Perl compiler finally provides developers with direct access to real C data types and their C++ equivalents.
Upgrade your Perl, start utilizing data types today!

https://sched.co/ylEW