in reply to getting multiple return values from system()

The manpage for ssh claims:
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" +);

Replies are listed 'Best First'.
Re^2: getting multiple return values from system()
by handarbyte (Initiate) on Jul 25, 2009 at 17:26 UTC
    That's what I used, but my interpretation of the values was wrong. I did not expect ssh to be so clever to "pipe" the result I wanted. Thank you too!