in reply to Problems with looping through an array
When you encounter a new value:
it s correct to initialise the count to 1, because you've just seen the first example of the new value.elsif($evr_id != $a) { print "$processed) $evr_id-$count\n\n"; $count = 1; ...
When you first enter the loop, though, you haven't yet seen the first example of the initial number. So you should be initialising $count to 0 before the loop, not 1.
Hugo
|
---|
In Section
Seekers of Perl Wisdom