in reply to Re^3: Errors with sorting hashs
in thread Errors with sorting hashs

I figured it out!!! I had declared the $ip_addr and $sender as a my and it should have been an our.
my $ip_addr; my $sender;
to
our $ip_addr; our $sender;