doctor has asked for the wisdom of the Perl Monks concerning the following question:
it's goin go transfare from linux to windows and monitors the log.txt file and match the content with rules.txt file which is linux.. the problem is i can't match the file in linux is there a possible way to send the rules.txt file with the agent code? and how? or is there any possible way to do this jobuse File::Tail; $|++; open FH, "<rules.txt"; @rules=<FH>; close FH; $name="C:\\users\\Mizo\\desktop\\log.txt; $file=File::Tail->new(name=>$name, maxinterval=>1,interval=>1, adjust +after=>1); while (defined($line=$file->read)) { for (@rules) { $rule=$_; if($line=~/^Request:($rules)/i){ print "$line"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Matching between files in different machine..?
by Bloodnok (Vicar) on Apr 10, 2009 at 12:01 UTC | |
|
Re: Matching between files in different machine..?
by almut (Canon) on Apr 10, 2009 at 11:56 UTC |