what are prefix dereferencer and list them out?



what are prefix dereferencer and list them out?..

Answer / Ranjeet Kaur

In Perl, a prefix dereferencer is denoted by the unary operator 'ref' followed by the variable name (e.g., ref($variable)). Prefix dereferencing allows you to access the value stored in a reference without first dereferencing it explicitly. This can be used with scalars, arrays, hashes, and other types of references. For example: my $array_ref = @my_array; print ref($array_ref); # prints 'ARRAY'

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More CGI Perl Interview Questions

what is Perl one liner?

1 Answers  


Consider the following example #! /bin/perl use strict; sub sample { my @arr=(1,2,3,4); return @arr; } my ($a,$b,$c,$d) = &sample; print "$a\n$b\n$c\n$d\n"; In the above code, How can I get the $c without using the arguments such as $a,$b. I don't want to use any array to get the return values.

2 Answers  


Explain subroutine in perl?

1 Answers  


write a perl script to find whether a given line of text is starting and ending with same word or not ???

2 Answers   CSS,


Which guidelines by Perl modules must be followed?

1 Answers  


What is use of ‘->’ symbol?

1 Answers  


How interpreter is used in perl?

1 Answers  


Write syntax to add two arrays together in perl?

1 Answers  


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

1 Answers  


What are the different string manipulation operators in perl?

1 Answers  


What is the purpose of goto expr statement?

1 Answers  


Difference between Perl and Mod_perl?

2 Answers  


Categories