in reply to Re^2: Printing hash
in thread Printing hash
It will change the value in the list returned by keys and sort, but not in the original hash, e.g.
-imranmy %hash = (1 => 'a', 2 => 'b', 3 => 'c'); foreach my $value (sort keys %hash ) { $value--; } print join( ', ', sort keys %hash ), "\n"; # 1, 2, 3
|
|---|