Yes, undef gets treated as 0. Actually you can use += to make it even more succinct:
$myhash{$key} += 1;
In reply to Re: Initialization of hash element....
by GrandFather
in thread Initialization of hash element....
by Chon-Ji
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |