Content deleted Content added
m change source to syntaxhighlight |
m linking |
||
Line 42:
Perl has three typedefs that handle Perl's three main data types: Scalar Value (''SV''), Array Value (''AV''), Hash Value (''HV''). Perl uses a special typedef for the simple signed integer type (''IV''), unsigned integers (''UV''), floating point numbers (''NV'') and strings (''PV'').
Perl uses a [[Reference counting|reference count]]-driven garbage collection mechanism. SVs, AVs, or HVs start their life with a reference count of 1. If the reference count of a data value drops to 0, then it will be destroyed and its memory is made available for reuse.
Other typedefs are Glob Value (''GV'') which contain named references to various objects, Code Value (''CV'') which contain a reference to a Perl subroutine, I/O Handler (''IO''), a reference to [[regular expression]] (''REGEXP''; ''RV'' in Perl before 5.11), reference to compiled format for output record (''FM'') and simple reference which is a special type of scalar that point to other data types (''RV'').
|