use Socket; print map substr( $_, 4 ), sort map { my ( $src ) = /src\D+([\d.]+)/; my $ip = inet_aton( $src ) || "\0\0\0\0"; "$ip$_"; } @syslog;
In reply to Re: Sorting log files with IP addresses (duplicates)
by jwkrahn
in thread Sorting log files with IP addresses (duplicates)
by Secode
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |