#!/usr/bin/perl #!C:/Perl/bin/perl
The Cygwin shell will look at the 'shebang' line to determine what interpreter to use to run your script. So it will either run the cygwin perl (/usr/bin/perl) or the Activestate one (C:/perl/bin/perl) depending on which you put first. However, if you run it from an XP CMD window, I don't think it pays any attention to the shebang line. It'll be run with whatever perl you use from the command line or whatever perl is associated with it in the registry.
Put differently -- $^O tells you what the executing perl was compiled for, not where it was launched from.
-xdg
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
In reply to Re^3: Test for OS version in Perl
by xdg
in thread Test for OS version in Perl
by rlambert7
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |