At 11:42 AM 4/5/00 -0600, Cash, Robert wrote:
>Thanks for the help this worked great.  However is there a way redirect the
>STDOUT/STDERR that comes from this to an array?

That's what open2 is for. Unfortunately it doesn't work on VMS at the 
moment. (There's a bounty out for it--a quart of Hagen Daaz ice cream, a 
pint of home made hot fudge, and a dozen waffle cones--for whoever gets it 
working...)

>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


                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to