References You can get a reference to just about anything by putting a backslash in front of it: $ref = \@bar; # arrayref $ref = \%baz; # hashref $ref = \&doit; # coderef Perl remembers what it is a reference to. You can find out like so: ref $ref; # "CODE"