system($cmd); #### /usr/bin/rsh somehost -l someuser "ls -l" >> /tmp/someFile #### my $cmd = qq[$rsh $host -l $id "$command" >> $someFile]; system($cmd); #### my $output = IO::File->new("|tee $someFile"); local *STDOUT; open STDOUT, '>&', $output; #### my $cmd = qq[$rsh $host -l $id "$command"]; system($cmd); #### my @cmd = ($rsh, $host, '-l', $id, $command); print "Executing: ", join(' ', @cmd), "\n"; system(@cmd)