in reply to system call works on *nix not NT

Does rsh hostname -l username -n \"touch test\" work from a DOS-box or a shell on the w2k box?

Replies are listed 'Best First'.
Re^2: system call works on *nix not NT
by Anonymous Monk on Jul 01, 2004 at 11:43 UTC
    Thank you for your thoughts: I have now added the full path to rsh as suggested. It does not appear to have changed anything. I'm still looking at the shell quoting idea. Yes, I can run the rsh stuff from the command line on the w2k box just fine. Its only when I try and do it from the perl that things go wrong!
      You should do what gaal says, and check the return value from system, and check the $? variable (see perlvar, and use the $! variable if system() doesn't return 0. Also, you might want to consider using the Net::Rsh or Net::SSH modules from CPAN.