I have a perl app that can be run on any flavour of Windows, including Windows 7 64 bits.
This app needs to occasionally make external calls to an EXE file. Unfortunately, that EXE needs to be compiled differently for 32 vs 64 bits versions of Windows.
So, my script needs to know which version of Windows it's running on, in order to invoke either the 32 bit or the 64 bit version of the script.
I tried using the $^O variable, but it tells me MSWin32, eventhough the script is running on Win64. My guess is that the value of $^O is the name of the OS under which the perl interpreter was COMPILED, but I need the version of the OS that the perl interpreter is RUNNING on. For all sorts of reasons, we don't want to migrate the perl interpreter to 64 bit version yet.
Is there a way to tell what OS the perl interpreter is RUNNING on?
Thx.
In reply to How to know the Windows OS that perl is running on by alain_desilets
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |