Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Sat, 20 Nov 2004 09:03:39 -0800
From: Stephen Studley <sstudley@adobe.com>
Subject: Re: Executing ssh from perl
In-reply-to: <419E8F9F.2090908@familiehaase.de>
X-Sender: sstudley@mailsea.sea.adobe.com
To: "Gerrit P. Haase" <gp@familiehaase.de>
Cc: cygwin@cygwin.com
Message-id: <p06100506bdc527387ae2@[153.32.225.133]>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii; format=flowed
Content-transfer-encoding: 7BIT
References: <p0610050abdc2a0cde006@[153.32.225.133]> <Pine.GSO.4.61.0411181407420.17559@slinky.cs.nyu.edu> <p0610050bbdc2adfcf70d@[153.32.225.133]> <Pine.GSO.4.61.0411181537080.17559@slinky.cs.nyu.edu> <p0610050ebdc2bb230c14@[153.32.225.133]> <Pine.GSO.4.61.0411181627330.17559@slinky.cs.nyu.edu> <p06100513bdc2ce789408@[153.32.225.133]> <419E8F9F.2090908@familiehaase.de>
X-IsSubscribed: yes

At 1:28 AM +0100 11/20/04, Gerrit P. Haase wrote:
>Stephen Studley wrote:
>
>>At 4:30 PM -0500 11/18/04, Igor Pechtchanski wrote:
>>>perl -we 'my $str=`ssh -n user\@machine.domain ls`;print "[$str]\n"'
>>good idea, however same results, at least from my Windows machine.
>>The command-line perl works fine from my OSX machine.
>
>$ perl -we 'my $str=`ssh -n user\@machine.domain ls`;print "[$str]\n"'
>ssh: machine.domain: no address associated with name
>[]
>
>Actually this is working with cygwin perl as expected.
>

and it works for me as well, within cygwin perl. Should I not expect 
the same from the Windows perl interpreter?  Apparently not...

I have come up with a work around. The following gets me what I need.
system "$commands->[$i] 1> $stdout->[$p] 2> $stderr->[$p]";

Stephen

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

