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 my and local?

Answer Posted / mahendra ratnakar

The variables declared with "my" can live only within the
block it was defined and cannot get its visibility
inherited functions called within that block, but one
defined with "local" can live within the block and have its
visibility in the functions called within that block.

Is This Answer Correct ?    12 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the different types of data perl can handle.

901


Explain subroutine?

923


What are arrays in perl?

970


What is v-strings?

1074


In CPAN module, name an instance you use.

964


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

931


Explain the execution of a program in perl.

1000


Which has highest precedence in between list and terms? Explain?

871


Explain cpan?

982


How to copy a file in perl?

999


How can you create anonymous subroutines?

924


What is the purpose of “_file_ literal” and “_line_ literal” in perl?

918


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

926


What does -> symbol indicates in Perl?

982


How to dereference a reference?

990