At 03:23 PM 3/28/00 -0700, Cash, Robert wrote:
>Is there a way (module or other method) to send an applications commands?
>This applications unfortunately does not accept command line parameters so
>
>$ application_name command1 command2 commandx will not work.
>
>
>You start the application then at the application prompt type in the various
>commands:
>
>$ application name
> application_prompt> command 1
> application_promtp> command 2 .....
Sure. Use a piped open, like so:
open SUBCOMMAND, "| MCR AUTHORIZE" or die "Whups, failed $!/$^E";
print SUBCOMMAND "LIST\n";
print SUBCOMMAND "exit\n";
close SUBCOMMAND;
If there's a | at the start of the string to open the filehandle's tied to
the commands SYS$INPUT. If there's a | at the end of the string then the
filehandle is tied to the command's SYS$OUTPUT. If there's one on both
sides perl throws an error since Unix can't do that. :)
Check out the docs for the open function as well as the perlipc doc.
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk