The program that calls the previously shown code is:
#! perl -w scipt
# The previously shown code is within 20_October_2004_K.pl
use strict;
use warnings;
use File::Slurp;
for (;;)
{
foreach my $job (read_dir("G:/PUB_HLTH/Perl_program/DSR_calcula
+tion/20_October_2004/Input"))
{
next unless $job =~ /(.{1,20})\.txt$/;
my $job_out;
my $job_new_name;
if ($job =~ /(.{1,20})\.txt$/){
$job_new_name = $1.".ran";
$job_out = $1."_out.txt";
#print $1.".out\n";
}
U:/2004_2005/Development/Perl_development/20_October_2004/Output>
system "perl 20_October_2004_K.pl G:/Directory_path/Input/$job G
+:/Directory_path/Output/$job_out";
rename "G:/Directory_path/Input/$job", "G:/Directory_path/Input/$
+job_new_name" or warn $!;
}
sleep 5;
}
|