Hi All,

I am using following code

 #!/usr/local/bin/perl

 # Main program
 
 use warnings;
 use strict;
 use File::Find;

 my $file = 'c:\\backup.pl';
 open (FH, $file);
 my ($line);
 my $word = pop;
  while ($line = <FH>)
  {
   if ($line =~/$word/)
   {
   print "match found";
   }
   else
   {
    print "match not found";
    }
   }
    close FH;

 Following is the error

 readline() on closed filehandle FH at C:\irfan\search.pl line 13.

 can anybody plz help

Regards
Irfan Sayed

 

Reply via email to