C:\EITV10CM\base\repair\Companion_Repair\File2File\F2F.COM ... is OK. C:\EITV10CM\base\repair\Companion_Repair\File2SelfExt\F2SEXT.CMP ... is OK. C:\EITV10CM\base\repair\Companion_Repair\File2SelfExt\F2SEXT.COM ... Found the CMPAN/File2SelfExt virus !!! The virus has been removed from the file. Checking for another virus in the file ... C:\EITV10CM\base\repair\Companion_Repair\File2SelfExt\F2SEXT.COM ... is OK. C:\EITV10CM\base\repair\Companion_Repair\File2SelfFile\F2SFILE.COM ... Found the CMPAN/FIle2SelfFile virus !!! The virus has been removed from the file. Checking for another virus in the file ... C:\EITV10CM\base\repair\Companion_Repair\File2SelfFile\F2SFILE.COM ... is OK. #### #!/usr/bin/perl #!/usr/bin/perl #Program to read the command line report file; and extract the virus detection name for a file. $cmdrep = "d:/eitv10cm_cln.rep"; open FH, "<$cmdrep" or die "Cannot open $cmdrep. \n"; $fname = "C:\EITV10CMD\base\detection\basic_detection\Filename\DOIFFILE.COM"; while () { chomp; if($_ =~ /^$fname/i) #Instead $fname tried giving C:\EITV10CMD\base\detection\basic_detection\Filename\DOIFFILE.COM. { chomp($_); /\s(\.){3}.*?)$/; #Trying to extract everthing after ... $found = $1; } if ($found eq "is OK.") { $virusname = "OK"; print "The virus detection name is $virusname\n"; } if ($found =~ /^Found: (.*?) NOT a virus[.]/) { $virusname = $1; print "The virus detection name is $virusname\n"; } elsif ($found =~ /^Found the (.*?) (virus|trojan) !!!/) { $virusname = $1; print "The virus detection names is $virusname\n"; #exit(); } elsif ($found =~ /^Found potentially unwanted program (.*?)[.]/) { $virusname = $1; print "PuPs $virusname \n"; } elsif ($found =~ /Found (virus or variant|application) (.*?)( !!!|[.])/) { $virusname = $2; print "virus or variant $virusname \n \n"; } }