Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: open command for input

by aitap (Deacon)
on Nov 21, 2012 at 21:35 UTC ( #1005016=note: print w/ replies, xml ) Need Help??


in reply to open command for input

Have a look on IPC::Run - it might do just what you need to do.

Sorry if my advice was wrong.


Comment on Re: open command for input
Replies are listed 'Best First'.
Re^2: open command for input
by tmurnane (Novice) on Nov 23, 2012 at 17:03 UTC

    Thanks...this looks exactly like what I need, however, I do not have that module on my system and I would need to go through system support to it - I know I can install it without sys admin but this script is to go to clients servers and this would be a difficult task to ask of clients to install this module.

    If this is my only option, I do have ActiveState's Perl Dev Kit which allows me to build individual executables for the 5 platforms we support - Windows, Solaris, HP Linux, and AIX. But I believe I would have to install the Dev Kit on each of the platforms to do that.

      Another option is IPC::Open2, which is in core. This will require a bit more code, but should work:

      use IPC::Open2; open IN, "<", "commandfile"; # unfortunately, scalar filehandles won't + work this way open OUT, ">", "logfile"; my $pid = open2(">&OUT", "<&IN", "theprogram"); waitpid $pid, 0;

      You can also package your application together with module you use with the help of PAR::Packer (its installation is required only on the packager's computer). But I don't know whether it will interfere with PDK or not.

      Sorry if my advice was wrong.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1005016]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (13)
As of 2015-07-30 14:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (271 votes), past polls