Explain the difference between my and local?
Answers were Sorted based on User's Feedback
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 |
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 |
Write an expression or perl script to identify the entered ip address is valid or not?
Elaborate on perl bite-wise operators.
What happens to objects lost in "unreachable" memory, such as the object returned by Ob->new() in `{ my $ap; $ap = [ Ob->new(), $ap ]; }' ?
What does last statement do in perl?
What can be done for efficient parameter passing in perl? Explain.
How do I send e-mail from a Perl/CGI program on a Unix system?
How do I replace every TAB character in a file with a comma?
How will you get the count of parameters passed to a perl subroutine?
What purpose does each of the following serve: -w, strict, - T ?
Which web site will help the student to download the Java mini Project ?
What are the functions that can be performed using cgi program?
Explain chop?