ORIGINAL:
A Perl package is a collection of code which resides in its own namespace. Perl module is a package defined in a file having the same name as that of the package and having extension .pm. Two different modules may contain a variable or a function of the same name. Any variable which is not contained in any package belongs to the main package. Therefore, all the variables being used, belong to the ‘main’ package. With the declaration of additional packages, it is maintained that variables in different packages do not interfere with each other.
BETTER:
A Perl package is a collection of code that resides in its own namespace. A Perl module is a package defined in a file that has a .pm extension and is name with the same name as the package. A variable that is not contained in a package belongs to the main package. By declaring packages, variables do not interfere with with each other.
EXPLANATION:
Because “package” is being used in a general sense, the word “that” should be used instead of “which”.