I have used the following code to check the string called "Uninstall complete." in a file "test.txt". But its retturing as NOT MATCHED though the string is present in the file. Please help!
open (CHECKBOOK, "/usr/anil/scripts/Test/test.txt") || die "couldn't open the file!";
while ($record = <CHECKBOOK>)
{
if ("$record" eq "Uninstall complete.")
{
print "Matched\n";
}
else
{
print "NOT MAtched\n";
}
}
close(CHECKBOOK);