Create a function that is only available inside the scope where it is defined ?



Create a function that is only available inside the scope where it is defined ?..

Answer / Meenakshi Singh

"A subroutine (function) in Perl can be made private by defining it within another subroutine or a block using lexical (my) variables."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More CGI Perl Interview Questions

How to sort dates in Perl ?

1 Answers  


Explain the various characteristics of perl.

1 Answers  


Why do you use only Perl when there a lot of more languages available in market like C, Java?

1 Answers  


Can we load binary extension dynamically?

1 Answers  


What do you mean by context of a subroutine?

1 Answers  


How can you define “my” variables scope in Perl and how it is different from “local” variable scope?

1 Answers  


What are perl variables?

1 Answers  


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

3 Answers   HCL, Persistent,


Write a program to download the contents from www.perlinterview.com/answers.php website in Perl.

1 Answers  


What is the difference between chop & chomp functions in perl?

10 Answers   Cap Gemini, DELL, Electronic Data, TCS,


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

1 Answers  


How many types of primary data structures in Perl and what do they mean?

1 Answers  


Categories