Click here to get back home

Pipe and Par questions

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Pipe and Par questions E.D.G. 04-28-2008
Get Chitika Premium
Posted by Jürgen Exner on April 28, 2008, 6:42 pm
Please log in for more thread options
>[...]It involved having Perl start other programs
>running using Vista.
>
>Windows Vista has a Run command that can be isolated with a little time and
>effort and then used with the System command to start other programs
>running. If System is used to start another program without the Run command
>on my computer then Perl appears to stop running until the other program
>ends.

Yes. That is the designed and expected behaviour of system(), which will
return only after the called program has terminated.
If you want the called program to run in the background, then you will
have to start it in the background. You can use the DOS "start" command
to do so on Windows. I have not heard fo a "run" command, thou.

>What needs to be done to get Perl 5.10 (and Vista) to send information and
>commands directly to a separate program?

Are you trying to control the other program from you Perl program? Then
you may want to check out Expect.

jue

Posted by E.D.G. on April 28, 2008, 7:30 pm
Please log in for more thread options

"Jürgen Exne> If you want the called program to run in the background, then
you will
> have to start it in the background. You can use the DOS "start" command
> to do so on Windows. I have not heard fo a "run" command, thou.
>

Windows XP has a DOS start.exe command available. And I have been using it
successfully with Perl for quite a while. I could not find that program
anywhere in Windows Vista. Instead it has a "Run.lnk" command that will
work if you also use the SendKeys command with it. Things are more
complicated. But it does get the job done fast and without any screens
flashing.

> Are you trying to control the other program from you Perl program? Then
> you may want to check out Expect.
>
Yes. I would like Perl to send commands and data directly to another
program. I had not heard of an "Expect" command but will check on it.



Posted by Jürgen Exner on April 28, 2008, 9:44 pm
Please log in for more thread options

Is there a specific reason why you stealth CCed me? I happen to read the
NGs I am writing in!

>> Are you trying to control the other program from you Perl program? Then
>> you may want to check out Expect.
>>
>Yes. I would like Perl to send commands and data directly to another
>program. I had not heard of an "Expect" command but will check on it.

It's not a command (well, it could be on Unix) but a Perl module that
provides an interface similar to the expect utility.

jue

Posted by E.D.G. on April 30, 2008, 9:50 am
Please log in for more thread options

> Is there a specific reason why you stealth CCed me? I happen to read the
> NGs I am writing in!

Yes. I am posting some of these notes using a new computer with Windows
Vista and associated e-mail programs etc. instead of the more familiar
Windows XP. And that first response was sent by accident to your e-mail
address instead of to this Newsgroup.

> It's not a command (well, it could be on Unix) but a Perl module that
> provides an interface similar to the expect utility.
>
> jue

I understand. Thanks again.


Similar ThreadsPosted
Fundamental pipe questions March 30, 2007, 10:00 am
SIG October 3, 2007, 9:41 pm
children not getting eof from pipe June 19, 2005, 9:40 pm
WIN32::PIPE bug ? June 13, 2006, 11:25 pm
Zero equals pipe?? September 23, 2006, 9:17 pm
fork() & pipe() October 20, 2008, 9:47 am
writing to a pipe on win32 July 26, 2004, 12:42 pm
open of a pipe and waitpid() August 25, 2004, 12:51 pm
FAQ 8.23: How can I open a pipe both to and from a command? October 31, 2004, 6:03 pm
FAQ 8.23: How can I open a pipe both to and from a command? November 5, 2004, 12:03 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap