This is the mail archive of the
mailing list for the Cygwin project.
Re: Executing ssh from perl
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
> 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
|\ _,,,---,,_ firstname.lastname@example.org
ZZZzz /,`.-'`' -. ;-;;,_ email@example.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