On Tue, Dec 23, 2008 at 20:24, John W. Krahn <jwkr...@shaw.ca> wrote:
> Chas. Owens wrote:
>>
>> On Tue, Dec 23, 2008 at 13:12, Steve Pittman <spitt...@jhmi.edu> wrote:
>>>
>>> Does any one have a good example?
>>
>> snip
>>
>> That depends on what you want to do.  There are five common ways of
>> executing external programs (including shell scripts):
>>
>> 1. the system function*
>> 2. the qx// operator**
>> 3. the open function***
>> 4. the open2 function from IPC::Open2****
>> 5. the open3 function from IPC::Open3*****
>
> Don't forget:
>
> perldoc -f exec
snip

That isn't so much running another process as replacing the current
one.  That is unless you combine it with a fork, in which case you
have just reinvented system.

snip
> perldoc Shell
snip

from the docs:
    This package is included as a show case, illustrating a few Perl features.
    It shouldn't be used for production programs.

snip
> http://search.cpan.org/~adamk/IPC-Run-0.82/
snip

This one looks interesting, but it isn't in Core Perl.  The benefit of
the five I listed is that they are all available anywhere Perl is
available.  I am sure you could find many more on modules CPAN that
can help you run programs.  The Expect module* being one of the more
important ones.

* http://search.cpan.org/dist/Expect/Expect.pod

-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to