Teresa Thomas wrote:
Hi,
Hello,
Its my first time (first day actually!) using Perl and I would like some
help in performing some relatively simple operations.
My program outputs two columns of text based data. I want to parse this
information, extract some contents and send the contents (which are
actually program names) to yum, to be installed into a Unix machine.
Currently, I'm extracting the names using "split" command and pushing
the program names into an array. I want to know how to call a command
line utility (like yum or rpm) through Perl. Does this require any
additional libraries?
Advice on any alternate/better way of achieving the same would be great!
The simplicity of your problem sounds like you may just need a shell script.
If you really want to do it with Perl then you could run the external commands
with system:
perldoc -f system
or with open:
perldoc perlopentut
perldoc perlipc
perldoc -f open
or with modules like IPC::Open2 or IPC::Open3 or IPC::Run; or using backticks:
perldoc -f qx
perldoc perlop
John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/