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}++;
In reply to Re: Unique value count in hash not working properly
by keszler
in thread Unique value count in hash not working properly
by koolgirl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |