my {only in block } local protected [self, called sub's] our public ########################## #@file : CD.pm # #!/usr/bin/perl package CD; ########################## use strict; # compile time execution items # just call as `use CD;` require Exporter; # run time execution items # opt to call as `require CD.pl;` do # even includes+executes the file contents use Foo; # equivalent to: require Foo; Foo->import(); use Foo qw (foo bar); # equivalent to: require Foo; Foo->import(qw(foo bar)); Export allows to export the functions and variables of modules to user’s namespace using the standard import method. This way, we don’t need to create the objects for the modules to access it’s members. “use Armhmetic qw(multiply divide)” indicates that these two routines gets exported only when it is specifically requested as shown in the following code snippet. ################################## In parent file ########## @EXPORT = qw(copy move); @EXPORT_OK = qw(cp mv); # @EXPORT_OK does export of symbols on demand basis. ################################### In child ########## use Arithmetic; use Arithmetic qw(cp mv); ########################################## chop(@ARRAY); # removes the last character of the string completely chomp(@ARRAY); # chomp only removes the last character if it is a newline. @ISA # location of perl base class modules # perl's default location path @INC # user defined libs our @EXPORT_OK = qw(runscript); =============================================== use - included objects are verified at the time of compilation. require – included objects are verified at the run time before attempting to load a file or a module with use() or require(), Perl checks whether it's already in the %INC hash. If it's there, the loading and therefore the compilation are not performed at all do - does unconditional loading--no lookup in the %INC hash is made =========================================== match , subsitute , split