delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/01/29/11:00:22

From: Denis DOT Haskin AT bigfoot DOT com (Denis Haskin)
Subject: Solved! Re: Behavior of 'dir' in Perl after Cygwin installed
29 Jan 1999 11:00:22 -0800 :
Message-ID: <36B1C969.2C9C6AB5.cygnus.gnu-win32@bigfoot.com>
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com

Denis DOT Haskin AT bigfoot DOT com wrote:
> [snip]
> I am very perplexed as to why the behavior of the dir command, when
executed
> in a subprocess (backticks) from Perl, has changed.

I've figured it out, I think.  There's an external dir command in
cygwin, which
is the file /cygnus/cygwin~1/H-I586~1/bin/dir.exe.

Before I installed cygwin, the
     $ret = `dir`;
in Perl was running the internal NT cmd.exe dir command.  After cygwin
was
installed, my guess is that system() or backticks in perl were actually
scanning
the path to find a dir.exe first (and finding it in the cygwin /bin
directory)
and running that instead of the internal command.  I renamed cygwin's
dir.exe to
cygnus-dir.exe (since I don't really need it) and all is now hunky-dory.

Phew.

dwh

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019