in reply to Perl Hash Behavior.
if (!defined $hash{$key}) { $hash{$key} = 0; } [download]
Or that new-fangled thing with the //.