delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/06/29/06:12:21

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
X-AuthUser: gerrit:koeln.convey.de
Date: Sun, 29 Jun 2003 12:17:01 +0200
From: "Gerrit P. Haase" <gp AT familiehaase DOT de>
Organization: Esse keine toten Tiere
X-Priority: 3 (Normal)
Message-ID: <122777579059.20030629121701@familiehaase.de>
To: Soren A <somian AT adelphia DOT net>
CC: cygwin AT cygwin DOT com
Subject: Re: example needed pls: `cygpath -c <HANDLE>'
In-Reply-To: <Xns93A88A37D41F9soren1Gmane@80.91.224.249>
References: <Xns93A88A37D41F9soren1Gmane AT 80 DOT 91 DOT 224 DOT 249>
MIME-Version: 1.0

Hallo Soren,

you also wrote:
> I am trying to finish a test script that uses ActivePerl to call `cygpath`
> from itself (a system call, by open()-ing a pipe to capture the output of 
> the tool ...

>   {... stuff ...}
>   open(CTH, '-|', "C:/cygwin/bin/cygpath $MS_path_filename")
>     or die "Could not open() call to 'cygpath', what is up?";
>   $cygstyle_path = <CTH>;
>   chomp $cygstyle_path;
>   {... stuff ...}

#!/bin/perl

$MS_path_filename = 'H:\bin';
$MS_path_filename = quotemeta($MS_path_filename);
open(CTH, '-|', "H:/bin/cygpath $MS_path_filename")
  or die "Could not open() call to 'cygpath', what is up?";
$cygstyle_path = <CTH>;
chomp $cygstyle_path;

print "$cygstyle_path\n";

# SCRIPT_END


$ /bin/soren_problem.pl
/bin


What is the problem?

Gerrit
-- 
=^..^=


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