in reply to Re^3: re-initialize the hash
in thread re-initialize the hash

Yes, but unneccessarily complicated

Using the joy of x, your code can be shortened to:
use strict; use warnings; use Data::Dumper; my %hash=('a'=>1 , 'b' =>2 , 'c'=>3,); my @keys = keys %hash; @hash{@keys} = (0) x @keys; print Dumper \%hash;

Update:Note the parentheses around the zero. Without them you just get a string of zeros and the other values are undef. Also, you don't need scalar because the RHS of x is already in scalar context.