Hello, i am a little more than just a newbie to perl... I am writting some perlbased XMLRPC to perform actions on my server as I connect via web.
i am doing a simple task (adding an user) but, no matter how hard I try I cannot get the result from that command into the variable. Let me put the example code fot you to guide: $rescmd =""; # no error by default $cmd = "useradd -s /bin/false $useradd"; $rescmd = `$cmd`; The problem is that $rescmd stays empty. I know that it will be empty if everything goes okay (since well, useradd returns nothing if no error occours), but I'm trying to create an already existing user (to get the error). I guess my code is okay, but I get nothing in that variable. I tried to do something like that: $rescmd =""; # no error by default $cmd = "useradd -s /bin/false $useradd"; $rescmd = system($cmd); this works, but, I get an error code, not an error message, and what I need to show is an errormessage (and I don't feel like switching all of them to return the appropiate text). If anyone could help me, I'll be more than thankfull... BTW, I'm on Mandrake 8.2 (with perl 5) -- -------------------------------------- Martín Alejandro Carmona Selva 3 Way Solutions S.A. [EMAIL PROTECTED] www.3waysolutions.com ------------------------------------- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]