This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: example needed pls: `cygpath -c <HANDLE>'


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]