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

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.