in reply to Re: Odd number of elements error
in thread Odd number of elements error

why don't you just $count++ ?
And put it along with the the checking as well...
$data{$match}++ || $count++; # or, $count++ unless $data{$match}++;

Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!

Replies are listed 'Best First'.
Re^3: Odd number of elements error
by ysth (Canon) on Jul 15, 2007 at 19:38 UTC
    That's not equivalent; the original code only increments $data{$match} if it's false. But there are good odds that what you give is what the OP actually wanted.