Perl 5 Pocket Reference: Data Types

(idea) by eric+ (6 y) Tue Jun 20 2000 at 23:12:25

See the perldata manpage for complete documentation.

There are three basic data types in perl:

  1. scalars: In perl, a scalar is a variable which holds a single value. That can be a number (int or float) or a string or a reference.
  2. arrays: An array is a list of scalars.
  3. hashs: A hash is also a list of scalars, but one whose elements are named.

In addition to these three, perl also has: typeglobs, a group of variables which share an identifier; objects, blessed variables that are aware of what they are; and references, scalars which point to other variables, data or subroutines.

Perl 5 Pocket Reference

Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.