in reply to Standalone binary with cygwin perl (was: cygwin)

well the thing i am doing in cygwin that just dont work on activeperl is the following


my $pid=open(READ,"\\\\.\\c:");
while(<READ>){    
do something...
}

I did try using the win32 api with activestate's. But I was just never able to read bit by bit the disc till I tried cygwin.

Replies are listed 'Best First'.
Re: Re: cygwin
by Joost (Canon) on Sep 20, 2002 at 10:49 UTC
        my $pid=open(READ,"\\\\.\\c:");

    While i'm not sure what you are trying to do here, you seem to be opening a file named \.\c: and storing the status code of the open call in $pid

    If you are trying to read a directory named C:/, use something like:

    opendir DIR,"C:/" or die "Cannot read from dir C:/ $!"; for (readdir(DIR)) { # do something... } closedir DIR;
    There are some differences in file (and directory) naming between cygwin perl and activestate perl on windows, but I think (though I cannot test it right now) that C:/ should work for both. You might want to experiment with the filename and/or read the docs regarding that subject.

    If I misinterpreted your intentions, please explain what you are trying to achieve here.

    -- Joost downtime n. The period during which a system is error-free and immune from user input.