Hi
I try to Search for xp_cmdshell string in log.txt file but i got error?
my $file = "c:/logdata.txt";
open (IN,$file) or die "Can't read $file: $!";
my $tag = "xp_cmdshell";
open(IN,"<",$file) || die "could not open $file: $!\n";
while (<IN>) {
if (grep(/$tag/,$_)) {
#Do something
}
}
Close(file);