in reply to Re: An easier way to construct lists of numbers?
in thread An easier way to construct lists of numbers?

I think he just wants to search the numbers and doesn't care whether it's x or y. So your hash asignment becomes:
++$h{$_->[0]}; ++$h{$_->[1]};
and the result is simply printed with:
print join(' ',sort keys %h),"\n";