Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
There are seven separate kinds of package variables or variable-like elements in Perl: scalar variables, array variables, hash variables, subroutine names, format names, filehandles, and directory handles.
Each of these different kinds of package variables has its own namespace. Changing the value of one kind of variable does not in any way affect the value of another kind of variable with the same name. For example, the scalar variable $a is independent of the array variable @a: