in reply to difference between pointer and referrence in perl
one distinguishing feature of Perl, not available in C involves DYNAMIC creation of data structures and prevents excessive typing, this feature is called Autovivification, in reference view, a reference springs to existence if it is dereferenced under the assumption that it exists. With this in mind, you would notice that Perl references and C pointers are not exactly the same.
EXAMPLE: (Note the reference is held in the scalar value $reference!) $$reference=5; #Dereferencing before creating a reference. print "$$reference\n"; #Creation of $reference autovivifically. print "$reference\n";
|
|---|