Welcome, Guest
Username Password: Remember me

use Vs require in perl
(1 viewing) (1) Guest
Perl Script
  • Page:
  • 1

TOPIC: use Vs require in perl

use Vs require in perl 1 year, 4 months ago #463

  • scmuser
  • OFFLINE
  • Gold Boarder
  • scm master
  • Posts: 237
  • Points: 3427
  • Karma: 0
  • Honor Medal 2009
Hi,

Whats difference between "use" and "require" in perl?

Re: use Vs require in perl 1 year, 4 months ago #464

  • rajeshkumar
  • OFFLINE
  • Moderator
  • I love software configuration management
  • Posts: 370
  • Points: 44564
  • Karma: 4
  • Honor Medal 2009
use is done at ‘compile-time’ and require is done at ‘run-time’ (ie can conditionally load modules)
Regards,
Rajesh Kumar
Build and Release Engineer
My Blog: community.scmgalaxy.com/pg/profile/rajeshkumar

Re: use Vs require in perl 1 year, 4 months ago #465

  • rajeshkumar
  • OFFLINE
  • Moderator
  • I love software configuration management
  • Posts: 370
  • Points: 44564
  • Karma: 4
  • Honor Medal 2009
More...

use is a pre-built in function in perl to Imports some semantics into the current package from the named module, generally by aliasing certain subroutine or variable names into your package such as..

* use Module VERSION LIST

* use Module VERSION
* use Module LIST
* use Module
* use VERSION

More info..perldoc.perl.org/functions/use.html
Regards,
Rajesh Kumar
Build and Release Engineer
My Blog: community.scmgalaxy.com/pg/profile/rajeshkumar
  • Page:
  • 1
Time to create page: 0.86 seconds

     
    
Home Forum