for my $line (sort {unpack('C4',$a) <=> unpack('C4',$b) } keys %$value) { tinker_with($line); }