Perl Programming Question:
Download Questions PDF

How to dereference a reference?

Answer:

There are a number of ways to dereference a reference.
Using two dollar signs to dereference a scalar.
$original = $$strref;
Using @ sign to dereference an array.
@list = @$arrayref;
Similar for hashes.

Download Perl Programming Interview Questions And Answers PDF

Previous QuestionNext Question
Does Perl have reference type?What does length(%HASH) produce if you have thirty-seven random keys in a newly created hash?