DEVFYI - Developer Resource - FYI

How to dereference a reference?

Perl Questions and Answers


(Continued from previous question...)

How to dereference a reference?

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.

(Continued on next question...)

Other Interview Questions