1. You can create areference to any named variable or subroutine with a backslash. $scalarref = \$foo; $arrayref = \@ARGV; $hashref = \%ENV; $coderef = \&handler; $globref = \*STDOUT;
2. You can create areference to an anonymous array with square brackets. $arrayref = [1,2,['a','b','c','d']];
3. You can create areference to an anonymous hash with braces. $hashref = {'Adam' => 'Eve','Clyde' => $bonnie,'Antony' => 'Cleo' . 'patra',};
4. You can create areference to an anonymous subroutine by using sub without a subroutine name. $coderef = sub{print "Boink!\n"}; #&$$coderef prints "Boink!"
5. References to filehandles or directory handles can be created by referring the typeglob of the same name. &splutter(\*STDOUT); Sub splutter { my $fh = shift; print $fh "..........\n"; }
6. References can be created by dereferencing them.
■Dereferencing References
1. Using a Variable as a Variable Name $bar = $$scalarref;