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

Which statement has an initialization, condition check and increment expressions in its body? Write a syntax to use that statement.

973


Explain goto label?

865


Elaborate on perl bite-wise operators.

849


Explain the difference between declarations of 'my' and 'local' variable scope in perl?

868


Explain the default scope of variables in perl?

861


What is v-strings?

986


How to sort arrays in perl?

966


Why do we use "use strict" in perl?

912


Which of these is a difference between Perl and C++ ?

963


Why is it hard to call this function: sub y { "because" } ?

871


How to dereference a reference?

923


Suppose an array contains @arraycontent=(‘ab’, ‘cd’, ‘ef’, ‘gh’). How to print all the contents of the given array?

919


How to read file into hash array ?

1009


You want to connect to sql server through perl. How would you do that?

883


What are the advantages and disadvantages of perl language?

873