I am very new to perl programming and i was trying to write a program which read multiple files (*.pdb) from a folder and then i want those files should be read by a tool. So, how can i incorporate the tool in this script. I have the precompiled version of the tool.
use strict;
my $directory = "c:\\";
opendir( DIR, $directory )
|| die "Unable to open directory - $!\n";
my @files = grep /\.pdb/, readdir( DIR );
closedir( DIR );
foreach my $file (@files) {
open( FH, "$directory\\$file" )
|| die "Unable to open $file - $!\n";
while( <FH> ) {
}
close( FH );
}