Also, the script is working fine if i am changing permissions manually .it is fetching and appending data to $r_file Any suggestions.. ----- Original Message ----- From: Rahul Garg <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; John W. Krahn <[EMAIL PROTECTED]> Sent: Tuesday, December 04, 2001 6:57 PM Subject: Re: problem executing linux command in perl
chmod 0777, $r_file or die "Cannot chmod $r_file: $!"; giving error : error :Cannot chmod : no such file or directory ----- Original Message ----- From: John W. Krahn <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, December 04, 2001 6:29 PM Subject: Re: problem executing linux command in perl Rahul Garg wrote: > > I am transfering xyz.txt file from windows98 to linux server manually. > $r_file = "xyz.txt" ; > then in perl script i am executing `chmod 0777 $r_file` ; > # $r_file is in the same directory as is perl script > but the line is not executing > i have tried system command too. Use the chmod() function built in to perl. chmod 0777, $r_file or die "Cannot chmod $r_file: $!"; John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]