$^O eq 'Win32'
Code like this is pervasive and wrong. And not only that but holds back implementing proper Win32 OS identification in future versions of perl. Currently the only real way to determine if you are on a W2k box is code like Determine Windows Type or Version. The fact is that this should _not_ be necessary. Instead Perl should know and return the correct value in $^O. But so many people have _hardcoded_ tests like you (and tadman) do in this example and in the perl distribution that loads of tests will fail if it is ever changed and we (Win32 users) all get stuck with b0rked OS reporting. (Yes I started working on getting $^O to return the correct value and decided it wasnt worth the effort changing all those tests. Shudder. They are everywhere.)
At very minimum it makes sense to change the above to the much more flexible and forward compatible
to determine that you are on a Win32 box. But even still this test will _not_ tell you if you are on an XP box or a W98 box or....$^O =~/Win32/
Yves / DeMerphq
---
Writing a good benchmark isnt as easy as it might look.
In reply to $^O eq 'Win32' is a bad idea.
by demerphq
in thread use Win2000; and alike
by Courage
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |