in reply to difference between pointer and referrence in perl
For the most part, they act the same. Probably the biggest difference I have noticed is that you don't have to worry about dereferencing a reference after the object referred to goes out of scope:
my $ref; { my $var = 5; $ref = \$var; } # prints 5 print $$ref;
|
|---|