package fred |
$var = 3.14159; # defines fred to be a package and var to be a variable in this package so that variables following this statement should be accessed by |
$globalaccess = $fred::var; |
Packages can be nested |
package fred |
.................... |
package jim |
$var = 3.14159; # and now we use syntax |
$globalaccess = $fred::jim::var; |