Hi,
Can anybody tell me why its not printing the contents of each
inside a particular folder ?
I lost all my hairs scratching my head.
Thanks
Alok.

my $tstToRunDir = "C:\\perlScripts" ;
my $fileInTstToRunDir ;

opendir TST2RUN, $tstToRunDir || die "Failed to open $tstToRunDir $!\n" ;
open RESULTS_LOG, ">>ResultLog.log" || die "Failed to open log\n" ;

while ($fileInTstToRunDir = readdir (TST2RUN)){
 chomp $fileInTstToRunDir ;
 #open the file and get connection description and test description
 open FILE_2RUN, $fileInTstToRunDir || die " Failed to open 
$fileInTstToRunDir:$!\n" ;
 print "File is : $fileInTstToRunDir\n" ;
 next if($fileInTstToRunDir =~ m/^./ ) ;

 while( <FILE_2RUN> ){
  print $_ ;
  if ($_ =~ m/<Test Description/ ){
   print $_ ;
  }
 } 
 
 print RESULTS_LOG "File is : $fileInTstToRunDir\n" ;
 #$count++  ;
# close FILE_2RUN ; 
 
}
close RESULTS_LOG ;
close TST2RUN ;


 
____________________________________________________________________________________
Sucker-punch spam with award-winning protection. 
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html

Reply via email to