www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/09/06:18:50

Date: Sun, 9 Nov 1997 13:17:06 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Cesar Scarpini Rabak <csrabak AT dce03 DOT ipt DOT br>
cc: djgpp AT delorie DOT com
Subject: Re: Perl 5.004_02 -
In-Reply-To: <1.5.4.32.19971107125140.006ba23c@dce03.ipt.br>
Message-ID: <Pine.SUN.3.91.971109131644.11584G-100000@is>
MIME-Version: 1.0

On Fri, 7 Nov 1997, Cesar Scarpini Rabak wrote:

> Do you folks can devise a simple method to check if the script is being run
> from COMMAND.COM or spawned from a djgpp program?

Two things come to mind:

    1) If DJDIR is defined in the environment, you are under DJGPP
       (but it could also be that COMMAND.COM was invoked, as in
       shelling to DOS, before actually running the script).

    2) You could test for " !proxy" in the environment (with the
       leading blank!), but this will only be put there if the command
       line is longer than 126 characters.

Neither of these is fool-proof, of course.

- Raw text -


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