in reply to Re: Sorting log files with IP addresses (duplicates)
in thread Sorting log files with IP addresses (duplicates)
Using pack is probably a better option:For portability do not assume that the result of inet_aton() is 32 bits wide, in other words, that it would contain only the IPv4 address in network order.
my $ip = pack(C4 => split /\./, $src);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Sorting log files with IP addresses (duplicates)
by jwkrahn (Abbot) on Apr 23, 2006 at 01:40 UTC |