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...

what is the difference between require and use in perl?

Answer Posted / vinoth_bksys

The differences are many and often subtle:

* use only expects a bareword, require can take a
bareword or an expression
* use is evaluated at compile-time, require at run-time
* use implicitly calls the import method of the module
being loaded, require does not
* use excepts arguments in addition to the bareword (to
be passed to import), require does not
* use does not behave like a function (i.e can't be
called with parens, can't be used in an expression, etc),
whereas require does

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How will you open a file in a write-only mode in perl?

910


What is the difference between perl array and perl hash?

991


Why should I use the -w argument with my Perl programs?

925


what are the two ways to get private values inside a subroutine or block?

888


What are some of the key features of objects in perl?

896


Explain a tell function in perl?

925


What is the use of strict?

874


How to remove a directory in perl?

929


What is warn function in perl?

905


Explain socket programming in perl?

869


What are the features of perl language?

1031


How can memory be managed in Perl?

985


Explain the meaning of perl one-liner?

1006


Explain the internal working of cgi

888


Where do we require ‘chomp’ and what does it mean?

927