By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,693 Members | 1,972 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,693 IT Pros & Developers. It's quick & easy.

Check if Cygwin or Windows CMD

P: 25
Hi all
I am trying to verify from my Perl script, whether the environment I am running in is Cygwin or Windows CMD.

Thanks In Advance
Jan 6 '09 #1
Share this Question
Share on Google+
1 Reply


KevinADC
Expert 2.5K+
P: 4,059
Try this:

Expand|Select|Wrap|Line Numbers
  1. for $keys (keys %ENV) {
  2.    print "$keys = $ENV{$keys}\n";
  3. }
  4.  
See if COMSPEC is defined, something like:

COMSPEC = C:\WINDOWS\COMMAND.COM

I am not really sure it that tells you what you need to know but its a place to start until you get a better suggestion.
Jan 6 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.