Teresa Thomas wrote:
Hi,
Its my first time (first day actually!) using Perl and I would like some
help in performing some relatively simple operations.
Welcome to the world of Perl.
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.
You say "outputs" but you are trying to munge the data. Data that is
outputted cannot be munge. You have to munge it before output.
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?
Showing the piece of code that is giving you problems is a big help. I
think it would be better if you created a script file that contains all
the commands. That way you can pre-view it.
But the command you want is "system". See `perldoc -f system`.
Advice on any alternate/better way of achieving the same would be great!
Thanks,
Teresa
--
Just my 0.00000002 million dollars worth,
Shawn
"For the things we have to learn before we can do them, we learn by
doing them."
Aristotle
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/