Novice Perl programmers typically are told that Perl has no scope by default. While not technically accurate, without packages, variables in Perl appear to be global.
Technically, most variables are not "global". Variables are stored in "namespaces" which are created by packages.
One package exists by default: the main package. To prevent accidentally overwriting variables that exist in other portions of the script, you can create additional namespaces with the package command.
If you create a Perl module that will be called by another Perl program, ...