Explain the difference between my and local?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a chop() function in perl?

582


How can memory be managed in Perl?

553


Explain split function in perl?

567


Comment on the scope of variables in perl.

532


How to do comment in perl?

584






How many data types are there in perl?

542


Explain ivalue in perl?

534


What does the q{ } operator do?

525


What does undef function in perl?

530


Explain string comparison operators in perl.

567


What are prefix dereferencer?

514


What is the difference between use and require in perl programming?

523


Can inheritance be used in perl? Explain with the help of an example.

515


How we can navigate the xml documents?

545


What is perl shift array function?

535