my %hash = (1 => 'a', 2 => 'b', 3 => 'c'); foreach my $value (sort keys %hash ) { $value--; } print join( ', ', sort keys %hash ), "\n"; # 1, 2, 3