darknite87
01-15-2004, 05:17 PM
have Perl installed on a windows server and I cannot change directories from the script itself, but when I "cd" to the directory on the command line it works. The permissions are set correctly to 755.Here is the code snippet:
#!C:\Perl\bin\perl.exe
use File::Copy;
#The following are the subroutines
sub change_path {
chdir ($location);
return $location;
print "$location";
}
sub copy_files {
copy ($file, $location);
}
#Get the arguements and define them
@_ = $ARGV[0];
$file = $ARGV[0];
$file = s/C:\\Apache\\htdocs\\atm_dev\\suites\\//;
$location = "Z:\\system_test\\IT\\E_Business\\Projects\\iDEN_Up date_CFM\\ATM\\";
#Establish the clearcase commands to run on the command line
$coDirectory = "cleartool co -nc \.";
$mkElement = "cleartool mkelem -nc $file";
$ciDirectory = "cleartool ci -nc \.";
$ciFile = "cleartool ci -nc $file";
&change_path;
©_files;
#!C:\Perl\bin\perl.exe
use File::Copy;
#The following are the subroutines
sub change_path {
chdir ($location);
return $location;
print "$location";
}
sub copy_files {
copy ($file, $location);
}
#Get the arguements and define them
@_ = $ARGV[0];
$file = $ARGV[0];
$file = s/C:\\Apache\\htdocs\\atm_dev\\suites\\//;
$location = "Z:\\system_test\\IT\\E_Business\\Projects\\iDEN_Up date_CFM\\ATM\\";
#Establish the clearcase commands to run on the command line
$coDirectory = "cleartool co -nc \.";
$mkElement = "cleartool mkelem -nc $file";
$ciDirectory = "cleartool ci -nc \.";
$ciFile = "cleartool ci -nc $file";
&change_path;
©_files;