It is a WIN machine and you are right, it needs a double backslash '\\' for 
the path and that is how I have spcefied. Also, the system command is 
invoked straight using the path as a string, no passing as array.

Thanks,
Prachi

----Original Message Follows----
From: "Brian P. Hanley" <[EMAIL PROTECTED]>
To: "prachi shroff" <[EMAIL PROTECTED]>, [EMAIL PROTECTED],        
[EMAIL PROTECTED]
Subject: Re: system
Date: Thu, 7 Jun 2001 09:23:06 -0400 (EDT)

A couple things could be happening here.

How does the EXE being invoked by SYSTEM find the file it is trying to open? 
  Are you using relative paths?  If the file is on a WIN machine, you may 
need to double-back '\\' the path to the file so it can be found.

Second, how are you invoking SYSTEM?  Are you passing it an array with the 
arguments to execute?  I have found it is sometimes easier to assemble a 
large command string and pass that in instead of the parsed out array form.

--Brian


------Original Message------
From: "prachi shroff" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED], [EMAIL PROTECTED]
Sent: June 7, 2001 1:15:37 PM GMT
Subject: Re: system


Its the exe which cannot open another file........and I have to use system
and not exec, coz I need to get back to the script after executing the exe.
So, the problem is, the exe has no problems opening the other file if run on
the command prompt or by any other straight means, but if run within the
perl script it shows errors. Also, I have run other exe from the same script
and they work fine.

Thanks,
Prachi


----Original Message Follows----
From: Jean-Matthieu Guerin <[EMAIL PROTECTED]>
To: prachi shroff <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED]
Subject: Re: system
Date: Thu, 07 Jun 2001 15:05:40 +0200

Hello,

Is your perl script that can't open exe file or your exe that can't open
another file ?

- if perl can't open exe file:
check that exe's path is defined on your PATH environment variable
or
if perl srcipt and exe are in same directory, check line
SYSTEM("./myexe.exe")
the ./ stands for current directory.
or
try another way than SYSTEM : exec, ` `, ...

prachi shroff wrote:
  >
  > Hi,
  >
  > I am trying to run an executable file from within my perl script using
the
  > SYSTEM command. If I run the exe from either the command line or by
double
  > clicking, it works fine, but when I embed it into the perl script it
gives
  > errors compiling. It is an exe of a C code and shows errors specific to
the
  > code like "error opening a file" that it needs to read.
  >
  > Could anyone please give in any suggestions.
  >
  > Thanks,
  > Prachi

--
--------------------------------------------------------
   Jean-Matthieu Guerin
                Brime Ingenierie
                  [EMAIL PROTECTED]
--------------------------------------------------------

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
***********************************
*  Brian P. Hanley
*  Senior Consultant
*  Verity Professional Services
*  Ph: 757.547.9638
*  Fx: 240.248.8902
*  e-mail: [EMAIL PROTECTED]
*  http://www.verity.com
***********************************



_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

Reply via email to