in reply to Initialization of hash element....
Yes, undef gets treated as 0. Actually you can use += to make it even more succinct:
$myhash{$key} += 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Initialization of hash element....
by blazar (Canon) on Jun 01, 2007 at 11:51 UTC |