I'd suggest you look up how to use the chmod function.
perldoc -f chmod.
Also why chmod the script to 777. 755 should be fine.
I'd rewrite it as.
open FILE,$cfile or die "Cannot read from $file $!\n";
open TMP, ">$cfile.$$" or die "Cannot write to $file.$$ $!\n";
my $counter = 0;
while (<FILE>) {
$counter++ if s/$oldDate/$newDate/gi;
$counter++ if s/$yesDate/$repDate/gi;
print TMP;
}
close FILE,TMP;
print "Done Replacing $cfile\n";
print "initializing cleanup.sh\n";
chmod 0755, '/home/kidprod/cleanup.sh'
system("/home/kidprod/clea
print "completed cleanup.sh\n";
Main Topics
Browse All Topics





by: thoellriPosted on 2003-01-10 at 13:48:26ID: 7704800
Replace the line:
|| die "Cannot run";
eanup.sh}) ;
do "/home/kidprod/cleanup.sh"
with
system(qq{/home/kidprod/cl
Also make sure that the first line of cleanup.sh says:
#!/bin/sh
or something to the same effect.