in reply to Re: How to embed a tool in my script
in thread How to embed a tool in my script
Thanks @Darren, will the code look like this? and also i want the output to be printed for respective files as different files in different directory
my $dir = '/path/to/dir'; # read only pd files: opendir DIR, $dir or die "read dir $dir - $!"; my @pdb_files = grep /\.pdb/, readdir DIR; closedir DIR; foreach my $file (@pdb_files) { open( FH,"$dir\\$file") while(<FH>) { $output_from_my_precompiled_tool = `/path/to/my/tool $file`; } close(FH); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to embed a tool in my script
by McDarren (Abbot) on Feb 12, 2012 at 16:48 UTC | |
by angel_perl (Novice) on Feb 14, 2012 at 02:49 UTC | |
by McDarren (Abbot) on Feb 14, 2012 at 13:54 UTC | |
by angel_perl (Novice) on Feb 14, 2012 at 04:54 UTC | |
by angel_perl (Novice) on Feb 14, 2012 at 13:55 UTC |