in reply to Re: Opening external files with arguements
in thread Opening external files with arguements

It is a simple test program. Basicically, whatever number is entered as the arguement, the program merely spits it back out. I want to be able to specify what arguements are passed to the program so I can get the appropriate output of that program and use it in my perl code. Preferably, I would like the arguement passed to be a variable I will have earlier declared in the code.
  • Comment on Re^2: Opening external files with arguements

Replies are listed 'Best First'.
Re^3: Opening external files with arguements
by blazar (Canon) on Apr 28, 2005 at 16:01 UTC
    Then again open as of the documentation or "more simply" qx//, aka 'backticks', which personally I don't like. Remote chances are that you may be interested in IPC::Open2 or IPC::Open3 as well.
Re^3: Opening external files with arguements
by Transient (Hermit) on Apr 28, 2005 at 15:54 UTC
    Ahh, so you want to be able to call this program with arguments, then? Have you tried qx//?
Re^3: Opening external files with arguements
by holli (Abbot) on Apr 28, 2005 at 18:55 UTC
    It is a simple test program.
    Post your code. That will help a lot.


    holli, /regexed monk/
      Here is the program (in C++)
      int main(int argc, char *argv[]) { cout << argv[1]; system("PAUSE"); return EXIT_SUCCESS; }
      Just takes the arguement that was specified at run time and spits it back out. I want to be able to call this program from within my Perl code (preferably with arguements that are variables that I have specified in the Perl code as well.)