in reply to Octet Regex

Well, $octet is uninitialized because:
$octet ||= $_ if /($hacklist =~ m~((\d{1,3}\.){3}\d{1,3})~)/;
never matches anything.

It doesn't match anything since $hacklist is set to "hack.txt" early on in your script:

my $hacklist = "hack.txt";
Perhaps you meant $_=~ rather than $hacklist =~ ?

Replies are listed 'Best First'.
Re: Re: Octet Regex
by amearse (Sexton) on Apr 28, 2001 at 00:02 UTC
    When I used the $_ convention I came up with this:
    /(21/4/2001 - 21:00:16) --- Intruder Detection Event - [Remote =~ m~((\d{1,3}\.){3}\d{1,3})~)/: unmatched [] in regexp at C:\hack\hac +k.pl line 12, <HACK> line 79.
    Thanks for your help kschwab.