Can someone explain the point of references because I don't see why/when they'd be used?
The only example I can see would be useful is:
my ($array1,$array2) = @_;
}Apart from that, why would you need to do something like:
print $$b;??
Another example:
Fruit => 'apple',
Drink => 'cola'
);
my $bla = \%hash;Why not just use
??
Thanks.
Installations:http://www.wiredon.net/gt/
Favicon:http://www.wiredon.net/favicon/
The only example I can see would be useful is:
Code:
sub some_sub { my ($array1,$array2) = @_;
}
Code:
some_sub(\@array1,\@array2);Code:
$a = \$b; print $$b;
Another example:
Code:
%hash = ( Fruit => 'apple',
Drink => 'cola'
);
my $bla = \%hash;
Code:
print $$bla{Fruit};Code:
print $hash{Fruit};Thanks.
Installations:http://www.wiredon.net/gt/
Favicon:http://www.wiredon.net/favicon/