in reply to multidimensional dilemma

Sounds like a job for grep (my favorite!):
%ResultsByCode = ( registered => scalar(grep {$_ == 1} @resultStatus), unregistered => scalar(grep {$_ == 2} @resultStatus), waiting => scalar(grep {$_ == 3} @resultStatus), )

Russ
Brainbench 'Most Valuable Professional' for Perl