Your regex is wrong. $line is not storing the IP in that case.
$line =~ /^(\d+\.\d+.\d+\.\d+)/; #Extact the IP address
Should be /^(\d+\.\d+\.\d+\.\d+)/ #See the missing char? Forgot to escape
your second dot. OK, so that might match anyway but sloppy regex can be
quite nasty.
I did this just this week and, not trusting my data as usual, I wrote this:
#(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})#
I may be forgetting if the range uses braces or parens, but I think its
braces.
As for the newline, I don't see where you are assigning @test so I'm not
sure.
-=GLA=-
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]