Hi Daniel
I think the qx command will do what you want. It's described in perldoc
perlop
An example of it in use is
perl -e '$res=qx/date/;print $res;'
--
Andrew
Daniel Nascimento wrote:
Hello everyone!
I'm learning perl and I need some help.
I want to write a script that execute commands into a linux terminal
and catch the results but I don't know how to do this.
Example: I want a script try to create a new user, but it has to
verify if the user is created before do it. If the user was already
created the script has to print a message for user informing something
like this "user already created"
Somebody has a tip for me?
PS: Sorry by my English. I'm not a good speaker... I'm learning yet.
A big hug and thanks for all.
Daniel
--
Andrew
******************************************************************************
Andrew Smith BSc(Hons), MBA
Founder & Director
Valley Technology Research Limited
VTRL
14 Inverleith Place
Edinburgh
SCOTLAND
EH3 5PZ
T: 0131-5527543 or 0131-5529983(home)
M: 07807321039
F: 0131-5512702
E: [EMAIL PROTECTED])
******************************************************************************
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/