View Full Version : difference between hash and hash ref in perl
March 9th, 2007, 09:05 PM
Could someone elaborete on the difference between hash's and hash references in perl.
And when to use what?
Thanks in advance
March 9th, 2007, 11:32 PM
A hash is a basic data type in Perl. It uses keys to access its contents.
A hash ref is an abbreviation to a reference to a hash. References are scalars, that is simple values. It is a scalar value that contains essentially, a pointer to the actual hash itself.
March 10th, 2007, 01:18 AM
pointer was the magic word
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.