in reply to
Re^3: How to embed a tool in my script
in thread How to embed a tool in my script
will the code look like this? after embedding the external script ?
#!/usr/bin/perl
use strict;
use warnings;
my $dir = '.';
#for embeding the mcsearch percompile version
my $mcsearch = '/bin/mcsearch';
#to read the PDB files from the directory
opendir DIR, $dir or die "Cannot open directory $dir:$!\n";
my @pdb_files = grep { -f $_ && $_ =~ /\.pdb$/ } readdir DIR;
closedir DIR;
print "Enter the script file";
$a=<>;
open(IN,$a) or die;
#giving each file as a input to mcsearch
for my $file (@pdb_files)
{
while(<>)
{
my $content = `$mcsearch "$dir/$file"`;
chomp $content;
print "Content of $file is $content\n";
}
}