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

Explain goto name?

937


What do you mean by context of a subroutine?

982


Why we use CGI?

2540


How can you use Perl warnings and what is the importance to use them?

974


What does init 5 and init 0 do?

1015


How many loop control keywords are there in perl?

941


What is eval function in perl?

956


How do you match one letter in the current locale?

1019


What are the various file operations in perl. Explain with example.

948


Explain lists ?

941


What are the logical operators used for small scale operations?

959


“The methods defined in the parent class will always override the methods defined in the base class”. What does this statement means?

1016


How will you access an element of a perl array?

945


Explain goto label, goto name, and goto expr?

923


What is cpan ? What are the modules coming under this?

923