What happens when you return a reference to a private variable?
Answer / Sonam Khampa
When you return a reference to a lexical (private) variable, it is still in-scope and maintains its value. However, the returned reference may not be what you expect if the variable is redefined or destroyed before the function returns.
| Is This Answer Correct ? | 0 Yes | 0 No |
There is no strict data types in perl unlike in other high level languages like Java so wouldn't that be a problem if a code in perl is to be a written by a big team of 20+ members ?"
How do you debug a Perl scripting ( at the compile time error or run time error) in Unix environment ?
How will you get the count of parameters passed to a perl subroutine?
How can we create perl programs in unix, windows nt, macintosh and os/2 ?
Why should I use the -w argument with my Perl programs?
How to open a directory in perl?
How to code in perl to implement the tail function in unix?
You want to read command-line arguements with perl. How would you do that?
What do the symbols $ @ and % mean when prefixing a variable?
Which feature of Perl provides code reusability ? Give any example of that feature.
What is qq (double q)operator in perl?
What happens in dereferencing?