Subject: Re: example needed pls: `cygpath -c <HANDLE>'
From: "Gerrit P. Haase" <[email-masked]>
To: Soren A <[email-masked]>
Cc: [email-masked]
Date: Sun, 29 Jun 2003 12:17:01 +0200

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/