On Sun, Jun 29, 2003 at 12:17:01PM +0200, Gerrit P. Haase wrote:
Hallo Soren,
you also wrote:
I am trying to finish a test script that uses ActivePerl to call `cygpath`
{... 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
{Gerrit's output}
$ /bin/soren_problem.pl
/bin
What is the problem?
See my original message please! What I was asking for was an explanation
of the cygpath flag -c <HANDLE>.
I know the code above works, it ran for me too. First of all you aren't
reproducing the conditions of the test: NOT CygPerl, but Win32Perl (AS
Perl); secondly NOT on the console/terminal commandline but in a WSH
script (the code is executed when the "hooks" built in to WSH which know
how to call AS Perl, do so); and lastly I am not asking for readers to
reproduce the test (because it might be onerous to do so, because
they've never used WSH or don't have AS Perl installed, but if someone
does have a system which meets those criteria I'd be mightily obliged if
they would try).
I am just trying to understand what it might be about "cygpath" that it
cannot output anything under *these* conditions. Or find out whatever
there is to find out.
Thanks Gerrit!
Soren A.