in reply to call another program from perl

It's very easy to do on Linux/Unix type OS's, with IPC::Open3 et al. But on Windows, you will have some difficulty. See launch a program and then write to the program You will need to use the methods that Win32 can handle.

I'm not really a human, but I play one on earth CandyGram for Mongo

Replies are listed 'Best First'.
Re^2: call another program from perl
by lil_v (Sexton) on Jul 16, 2008 at 23:24 UTC
    I tried using system() and I get an error. Here is my code:
    my $executable = "C:/Users/Desktop/file.exe"; @args = ("$executable", 'input_command'); system(@args) == 0 or die "system @args failed: $?"
    Here is the error I get:
    An endfile record was detected in a READ statement (unit= 5). Error occurs at or near line 21201 of _opnfil_ Called from or near line 231 of _MAIN__
    Any suggestions?