Can someone tell me why the below code can't won't work.

Essentially, there is a directory full of files and I wanted to compare them
to names I stored in a file.  If the name of the file is not found I just
want to say file not found, etc...

A liitle help please....

$bin_dir = '.......';


open(FILE,'ck') or die "Could not open file!!!!!" ;
$ct=0;
while(<FILE>){$tmp = $_;chomp($tmp); $array[$ct] = $tmp;$ct++;}
close(FILE);


chdir($bin_dir);
opendir(BINDIR,$bin_dir) or die "Could not open" $trillium=@array;
$laurel = @binfiles;
foreach $file(@binfiles){
       $marker=0;
       $count=0;
       while($count <= ($trillium-1)){
               if($file eq $array[$count]){
                       $marker=1;
                       last;
               }

              $count++;
       }#while

       if($marker == 0){print"$file was not found\n";}
}





William Black



William Black



_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to