Packages & Modules
Exporting Symbols
- The use function will export a list of symbols from a
module given a few added statements inside a module
require Exporter;
@ISA = qw(Exporter);
- Then, provide a list of symbols (scalars, lists, hashes, subroutines, etc)
by filling the list variable named @EXPORT
Exercise |
- Take a look at the "Module2.pm" script (click the "Module2.pm" icon).
- Run the use example script.
- Take a look at the "use" script (click the "use" icon).
|

Module2.pm
|

use
|