Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Explain the difference between use and require?

Answer Posted / gopi sreekanth

use can take a bareword and require doesnot while accessing
module
use is used in compile time ie all code is parsed before
program run where as require is used in run time. So if
there is much code in initialization include that in use
rather than require
use supports import method by default and require doesnt
support
Inside use default import method will be present. BEGIN {
require Module; }

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can inheritance be used in perl? Explain with the help of an example.

909


How many ways can we express string in Perl?

903


What can be done for efficient parameter passing in perl? Explain.

964


How to read a single line from a file in perl?

927


How can you call a subroutine and identify a subroutine?

952


How will you get the count of parameters passed to a perl subroutine?

894


Which guidelines by Perl modules must be followed?

968


what are prefix dereferencer and list them out?

983


What are arrays in perl?

920


Explain different types of perl operators.

890


Differentiate use and require?

889


What is the use of -t?

915


What is the difference between perl array and perl hash?

985


Write a program that shows the distinction between child and parent process?

882


When does circular reference occur?

860