probably because I forgot to escape the @.  Perl thinks @remotehost is
an array that should be expanded.

The following I've tested, and it appears to work great (of course,
substitute your correct username / hostname combos below.)

open (SPAMCFG, "|ssh us...@remotehost 'cat >> /home/user/logfile'");
print SPAMCFG "hello.\n\n";

On 5/11/09, Nelson Serafica <[email protected]> wrote:
>
>  I tried this but it doesn't work :(
>
>
>  Daniel Eggleston wrote:
>  > you would have to use a pipe instead of a redirect, i.e.
>  > open (SPAMCFG, "|ssh u...@remotehost 'cat >> /home/user/logfile'")
>  >
>
>
> >
>


-- 

           Daniel

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Linux Users Group.
To post a message, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit our group at 
http://groups.google.com/group/linuxusersgroup
-~----------~----~----~----~------~----~------~--~---

Reply via email to