#-------------------------------------------------------
# Defines
#-------------------------------------------------------
-my $VERSION="1.1 (build 1)";
+my $VERSION="1.1 (build 2)";
# ---------- Init variables --------
my $Debug=0;
my $cpt=1;
for (0..@ARGV-1) {
- if ($ARGV[$_] =~ /^-/) { last; }
+ if ($ARGV[$_] =~ /^-/) { next; }
$ParamFile{$cpt}=$ARGV[$_];
$cpt++;
}
#--------------------
my $Host;
if ($DNSLookup) {
- if ($_ =~ /(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/) {
+ if ($linerecord{$logfilechosen} =~ /(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/) {
$Host=$1;
if (! $TmpHashDNSLookup{$Host}) { # if $Host has not been resolved yet
if ($MyDNSTable{$Host}) {
# Put record in queue
debug("Add record $NbOfNewLinesProcessed in queue ($Host).",4);
- $QueueRecord{$NbOfNewLinesProcessed}=$_;
+ $QueueRecord{$NbOfNewLinesProcessed}=$linerecord{$logfilechosen};
$QueueHosts{$NbOfNewLinesProcessed}=$Host;
# Print all records in queue that are ready