Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello perk monks

I've made a little perl script to do some admin for windows2000. My script only works with cygwin perl because certain "unix" things it does, it simply wont work with activestate's perl.

I wish to make my script work as an stand alone binary, well some *.dll is acceptable, unfortunately perlapp and perl2exe just dont work with cygwin perl, any ideas monks?

Edit kudra, 2002-09-20 Changed title

  • Comment on Standalone binary with cygwin perl (was: cygwin)

Replies are listed 'Best First'.
Re: cygwin
by perrin (Chancellor) on Sep 19, 2002 at 21:30 UTC
    Why don't you tell us what external commands it's using? Then we can suggest how you can port it to be pure perl and get it running on ActiveState.
Re: cygwin
by Anonymous Monk on Sep 19, 2002 at 22:28 UTC

    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.

          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.