delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/11/22/12:34:00

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Mon, 22 Nov 2004 12:33:28 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Stephen Studley <sstudley AT adobe DOT com>
cc: "Gerrit P. Haase" <gp AT familiehaase DOT de>, cygwin AT cygwin DOT com
Subject: Re: Executing ssh from perl
In-Reply-To: <p06100506bdc527387ae2@[153.32.225.133]>
Message-ID: <Pine.GSO.4.61.0411221232110.20353@slinky.cs.nyu.edu>
References: <p0610050abdc2a0cde006@[153.32.225.133]> <Pine DOT GSO DOT 4 DOT 61 DOT 0411181407420 DOT 17559 AT slinky DOT cs DOT nyu DOT edu> <p0610050bbdc2adfcf70d@[153.32.225.133]> <Pine DOT GSO DOT 4 DOT 61 DOT 0411181537080 DOT 17559 AT slinky DOT cs DOT nyu DOT edu> <p0610050ebdc2bb230c14@[153.32.225.133]> <Pine DOT GSO DOT 4 DOT 61 DOT 0411181627330 DOT 17559 AT slinky DOT cs DOT nyu DOT edu> <p06100513bdc2ce789408@[153.32.225.133]> <419E8F9F DOT 2090908 AT familiehaase DOT de> <p06100506bdc527387ae2@[153.32.225.133]>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.39

On Sat, 20 Nov 2004, Stephen Studley wrote:

> 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...

Ah.  This changes the whole ballgame.  No wonder we couldn't reproduce
this.

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

That's probably the best you could hope for at this point.  If you want to
know why the original program didn't work as expected, you should really
ask the distributor of your Windows perl version (ActiveState?) and not
this list.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019