If the path has spaces you need to embedd it in double quotes so your
command string should look like:
system("perl \"C:\\Documents and
Settings\\Done\\Desktop\\ActivePerl-5.6.1.638-MSWin32-x86\\ActivePerl\\Perl\\bin\\helloworld.pl\"");
Cabbi
|--------------------------------->
| "sanofsans" |
| <[EMAIL PROTECTED]>|
| Sent by: |
| [EMAIL PROTECTED]|
| m |
| |
| |
| 29.03.2007 06:40 |
| |
| |
| Please respond to |
| [EMAIL PROTECTED]|
| m |
| |
|--------------------------------->
>----------------------------------------------------------------------------------------------------------------------|
|
|
|
|
|
To|
| [email protected]
|
|
cc|
|
|
|
Subject|
| [c-prog] Re: starting a perl program from a c program
|
|
|
|
|
|
|
|
|
|
|
>----------------------------------------------------------------------------------------------------------------------|
Thanks for your help. I tried that, but I am getting an error.
This is my program:
#include <stdio.h>
void main()
{
/*system("perl C:\path\to\script"); */
system("perl C:\\Documents and
Settings\\Done\\Desktop\\ActivePerl-5.6.1.638-MSWin32-x86\\ActivePerl\\Perl\\bin\\helloworld.pl");
return;
}
This is the error:
Can't open perl script "C:\Documents": No such file or directory
Press any key to continue
Any suggestions?
