Thanks for the many replies. Sorry .. I should have given
the full code, to avoid the confusion. The double backslashes
is infact in the code, so its not the issue.
Let me more elaborate..
my $sourcefile = 'c:/appl/process/attr_name.txt';
my $destination = '//System1/ShareDir';
$sourcefile = slashtobackslash($sourcefile);
$destination = slashtobackslash($destination);
system("copy $sourcefile $destination");
}
sub slashtobackslash
{
my $value = $_[0];
$value =~ s-/-\\-g;
return $value;
}
I am processing the file at the server side, and trying to
copy to the target system. The target system has shared
directory which has full permissions. When I copy from the
server to this target system using copy command on command
line, that works fine and the user is any user(administrator,
or normal user which was being created).
Regarding the cgi program user, the explanation I got from
the IS group is may be the user might not have permissions,
to write into any system, may be for the security issues.
Well I wish I can be more specific, but as I am dealing
with server, I dont have direct access to it. All the
things I figured out till now are through cgi program and
interacting with some one on IS and getting the feedback !!!
Well about the return call of system command .. I will be
checking now.
IS dept. enabled the ftp from the server to the target system
to the specific directory and may be I can use net::ftp module
to implement this?
use Net::FTP;
$ftp = Net::FTP->new("targetsystem", Debug => 0);
$ftp->login("anonymous");
$ftp->put("c:\\test11.pl");
$ftp->quit;
I'm getting the following error ..
Use of uninitialized value in concatenation (.) or string
at C:/Perl/site/lib/Net/FTP.pm line 310.
Any ideas?
Thanks in advance,
Raj. |