Which functions in PERL allows you to include a module file. State their differences.

devquora
devquora

Posted On: Feb 22, 2018

 

The functions that allow us to include a module file or a module is the “use” and “require” function. The differences between the two are:
  1. The “use” function is used for loading the module at the compile time whereas the “require” function is used for loading the module at the runtime.
  2. “Use” calls the import function of modules inbuilt whereas “require” calls the import module separately.
  3. The “use” function is used only for the modules and that too for including .pm type file. The “require” function is used for both the libraries and modules.
  4. In “use,” we are not required to specify the file extension whereas in “require,” it is mandatory to specify the file extension.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Perl Interview Questions

    List all the features of Perl programming.

    Practical extraction and reporting language (PERL) is an open source software which is used to develop web-based applica..

    Perl Interview Questions

    What are the benefits of PERL in using it as a web-based application?

    The benefits of using PERL programming are: PERL is known as the duct tape of the internet. PERL can accelerate the pro..

    Perl Interview Questions

    Talk about the applications of PERL.

    PERL has myriad and varied applications. PERL is used to write Common Gateway Interface scripts and large projects like..