#!/usr/bin/perl -- use strict; my %hash = (); $hash{a}{drinks}=1; $hash{b}{drinks}=2; my $p = \%hash; my %copy = %{ $p }; use Data::Dumper; print Dumper( \%hash, \%copy, $p ); __END__ $VAR1 = { 'a' => { 'drinks' => 1 }, 'b' => { 'drinks' => 2 } }; $VAR2 = { 'a' => $VAR1->{'a'}, 'b' => $VAR1->{'b'} }; $VAR3 = $VAR1;
In reply to Re^3: hash ref mind blow
by Anonymous Monk
in thread hash ref mind blow
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |