Distinguish my and local?



Distinguish my and local?..

Answer / Lal Singh

"my" creates a new lexical variable that is only visible within its own scope, while "local" creates a lexical variable with the same name as an existing global variable, but within its own scope it overrides the global variable.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More CGI Perl Interview Questions

Explain returning values from subroutines?

1 Answers  


What is perl I used for?

1 Answers  


What are the logical operators used for small scale operations? Explain them briefly.

1 Answers  


How to convert arrays into a string in perl?

1 Answers  


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

1 Answers  


What is the difference between use and require in perl?

1 Answers  


What is the different between array and hash in perl programming?

1 Answers  


i have a folder called 'error' and in that, i have error log files which are generated by the build, now i want to findout the string 'error' from each log file and that error has to be copied into the another file called 'analysis'. how do you do this in perl?

5 Answers   HP,


write a script to display mirror image of a entered value and also check whether Palindrome

3 Answers   HCL, Persistent,


Which web site will help the student to download the Java mini Project ?

3 Answers  


Why does Perl not have overloaded functions?

1 Answers  


How many data types are there in perl?

1 Answers  


Categories