ssh exits with the exit status of the remote command or with 255 if an error occurred.Have you tried to look at the return value of system?
my $status = system("/usr/bin/ssh $server \"/usr/sbin/useradd $login\" +");
or, using qq...
my $status = system qq(/usr/bin/ssh $server "/usr/sbin/useradd $login" +);
In reply to Re: getting multiple return values from system()
by toolic
in thread getting multiple return values from system()
by handarbyte
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |