in reply to Unique value count in hash not working properly
Incidentally, your
could be replaced by justif ($count{$batch_dates}) { $count{$batch_dates}++; } else { $count{$batch_dates} = 1; } # end if
If no $batch_dates key previously existed in %count, then the first use of it with ++ will autovivify (with numeric value zero) and increment to 1.$count{$batch_dates}++;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Unique value count in hash not working properly
by Anonymous Monk on Oct 01, 2011 at 00:02 UTC |