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?

Answers were Sorted based on User's Feedback



Explain the difference between my and local? ..

Answer / 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

Explain the difference between my and local? ..

Answer / sourisengupta

You can consider "my" as local and "local" as global
variable like C,C++.

The scope of "my" lies between the block only but if we
declare one varable global then we can asccess that from
the outside of the block also.

Is This Answer Correct ?    2 Yes 7 No

Post New Answer

More CGI Perl Interview Questions

Write an expression or perl script to identify the entered ip address is valid or not?

5 Answers   HCL,


What does length(%HASH) produce if you have thirty-seven random keys in a newly created hash?

0 Answers  


What is v-strings?

0 Answers  


What does init 5 and init 0 do?

0 Answers  


How to code in perl to implement the tail function in unix?

0 Answers  


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

0 Answers  


how to get back up from private character editor which is saved in the format of .udf

0 Answers  


Explain about typeglobs?

0 Answers  


Explain perl one-liner?

0 Answers  


How many loop control keywords are there in perl?

0 Answers  


What's the difference between /^Foo/s and /^Foo/?

0 Answers  


How to print escaping characters inside a string in perl?

0 Answers  


Categories