in reply to deletion in hash of array
Output -use Data::Dumper; $hash{a} = [ 1, 2, 3 ]; $hash{b} = [ 4, 5, 6 ]; print Dumper(\%hash); while (($key, $value) = each %hash) { print $key, "\n"; delete $hash{$key}; }
By the way, what was the syntax error it complained about?$VAR1 = { 'a' => [ 1, 2, 3 ], 'b' => [ 4, 5, 6 ] }; a b
|
|---|