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

What is Perl?

1053


Which functions in Perl allows you to include a module file or a module and what is the difference between them?

1090


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

1069


What is 'rollback' command in perl?

993


In CPAN module, name an instance you use.

1003


what is the function of Return Value?

1119


How many ways can we express string in Perl?

1011


How many types of operators are used in the Perl?

1071


Comment on data types and variables in perl.

980


Which feature of perl provides code reusability?

1043


Comment on the scope of variables in perl.

960


how to extract pin_code,phone_number,year from text file using regular expressions in perl

2275


How to concatenate strings in perl?

1088


Explain the default scope of variables in perl?

992


How to read from a pipeline with Perl

1097