Libraries and Modules : Module « Language Basics « Perl






Libraries and Modules

   

Library files have a .pl extenson; 
modules have a .pm extension. 
Path to Libraries

@INC array contains list of path to standard Perl libraries.

#To load an external file, use either require or use.

require("getopts.pl"); # Loads library file at run time
use CGI;  # Loads CGI.pm module at compile time       

   
    
    
  








Related examples in the same category

1.Using Perl to Create Your Own Module
2.Using a Module from the Standard Perl Library in a Script)
3.Using a Perl 5 Module from the Standard Perl Library