>
> Assuming there is only one set of brackets on a line, and you only want the IP
> address between them, and READLOG is an open handle to your log:
>
> - Not Tested -
> my @ips;
> while (my $line = ) {
>if ($line =~ /\[(.*)\]/) {
> push @ips, $1;
>}
>else {
> print STD
I'm trying to build a script to automagically black-list spammers. How
can I extract the ip address from between [ ]?
turn this:
Received: from 24.60.195.149 (h00a0cce008a4.ne.client2.attbi.com
[24.60.195.149])
Received: from 11.139.74.233 ([11.139.74.233]) by n7.groups.yahoo.com
with NNFMP; M