The difference is that it clones the data structure without reference to the same memory.
For instance:
use strict; use warnings; use Data::Dumper; my $h={'a'=>1,'b'=>2}; my $exact_copy=$h;
By the way, manually initializing a hash using all commas (as in my $k = {3,5,6,8}
) is very, very ugly.
user554546
source share