Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Run executable and follow on commands from CMD line

by cosmicperl (Chaplain)
on Oct 22, 2018 at 14:40 UTC ( [id://1224499]=note: print w/replies, xml ) Need Help??


in reply to Run executable and follow on commands from CMD line

Not something I've tried before. But there might be a way by using open, much the same way you would when piping things to sendmail:
open(MAIL, "|/usr/sbin/sendmail -t"); print MAIL "To: $to\n"; print MAIL "From: $from\n"; print MAIL "Subject: $subject\n\n"; print MAIL $message; close(MAIL);
Otherwise, as you are on windows, maybe part of what you need can be achieved with a .bat?

Replies are listed 'Best First'.
Re^2: Run executable and follow on commands from CMD line
by Anonymous Monk on Oct 22, 2018 at 16:08 UTC

    Wow!! Thank you so much! I hadn't tried that approach yet. I spent about 6 hours trying all kinds of stuff! But it worked perfectly! Here's the code I just used.

    open(Gateway, "|C:/some location/gateway uname\@jupiter.jupiter"); print Gateway "COM open_job,job=232\n";

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2024-05-27 07:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found