Hi All, I modified the code as per suggession but still error
#!/usr/local/bin/perl # Main program use warnings; use strict; use File::Find; my $file = "c:\\irfan\\cqcmd.txt"; open (FH, $file) | die "file can't open $! \n"; my ($line); while ($line = <FH>) { if ($line =~m/foo/) { print "match found"; next; } else { print "match not found"; } } close (FH); error is Useless use of bitwise or (|) in void context at C:\irfan\search.pl line 10. file can't open Bad file descriptor Regards Irfan Sayed