First:
use "\" not "/".
Second:
You have to escape the "\" with a second "\" when using double quotes.

Your line needs to read:
$sys="C:\\antiword\\antiword.exe -t -w 10000 document.doc >
C:\\Inetpub\\wwwroot\\somedir\\document.txt";

That shou'd work.

Alternatively, you could do it this way:
$sys='C:\antiword\antiword.exe -t -w 10000 document.doc >
C:\Inetpub\wwwroot\somedir\document.txt";

That should work also.

Cheers,
john
> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Alejandro Santillan
> Sent: Tuesday, December 06, 2005 3:03 AM
> To: perl-win32-users@listserv.ActiveState.com
> Subject: Executing an external program from a perl scrip.
> 
> 
> Trying to migrate a perl script from linux to windows (IIS), 
> I need to execute a command line from within the perl script. 
> This snippet worked fine in linux (provided the path is 
> correct), but it didn't work in windows:
> 
> $sys="C:/antiword/antiword.exe -t -w 10000 document.doc > 
> C:/Inetpub/wwwroot/somedir/document.txt";
> system($sys);
> 
> The snippet works fine if the script is run from the DOS 
> window, or by double clicking, but is makes nothing when it 
> is executed as a CGI. I've double checked that the 
> destination folder has write permissions working fine. Is the 
> "system(...);" sentence not appropriate under the windows 
> envirnonment?
> 
> Thanks,
> Alejandro
> 
> 
> _______________________________________________
> Perl-Win32-Users mailing list 
> Perl-Win32-Users@listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to