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 are some of the key features of objects in perl?

517


Difference between the variables in which chomp function work ?

608


You want to read command-line arguements with perl. How would you do that?

498


What are the steps involved when the cgi program starts running?

510


What is perl shift array function?

528






What are the different ways to run cgi?

492


How to renaming a file in perl programming?

553


what is Perl one liner?

540


How to change a directory in perl?

549


What is a chomp() function in perl?

519


Hi, I am a accountant. I am preparing a balance sheet but because of staff shortage and time pressures I cant complete it on time. There is lot of common data with last years which I need not retype and I can manage by editing last year’s balance sheet ? Is their any software on net where I can do this easily??

1761


How the interpreter is used in Perl?

533


Explain string comparison operators in perl.

556


We all know private variables exist in perl. But do private METHODS exist in perl ? Eg ?

2001


What do you mean by context of a subroutine?

564