Q1.
Now, I am getting error :
Use of uninitialized value $outdir in concatenation (.) or string at ./stridenew.pl line 14.
Q2. I have files like *_TS* in different folders and I want to pass it as an if command. Any suggestions how?
Q3. The files I just mentioned are in some 600+ folders. Is there any clever way to make this script read into individual folders itself and execute if found with the similar files?
Kindly help and thanks in advance !
Cheers
Aj
Code:
#!/usr/bin/perl -w
$dir=$ARGV[0];
$outdir=$ARGV[1];
opendir(DIR,$dir);
@files=readdir(DIR);
foreach $file(@files)
{
# if($file=~/\.pdb\.fixed$/)
if($file=~/\.scwrl$/)
# if($file=~/\_TS*$/)
{
$strideoutfile="$outdir/$file.str";
`touch $strideoutfile`;
print "Running Stride on the $file.. \n";
# next if(-e $strideoutfile &&
# -s $strideoutfile > 0);
`/afs/pdc.kth.se/home/a/arnee/MODULES/scientific/stride/linux/bin//stride $file -f$strideoutfile`;
print "script executed \n";
print "$strideoutfile \n";
}
}
Now, I am getting error :
Use of uninitialized value $outdir in concatenation (.) or string at ./stridenew.pl line 14.
Q2. I have files like *_TS* in different folders and I want to pass it as an if command. Any suggestions how?
Q3. The files I just mentioned are in some 600+ folders. Is there any clever way to make this script read into individual folders itself and execute if found with the similar files?
Kindly help and thanks in advance !
Cheers
Aj