in reply to How do I tell what OS I'm running under?
As someone pointed out, the $^O variable may have been set wrong. Another way to do it would be to check for the existence of certain files - it looks like from your example that you already know of two directories that will be there. You could simply test for one or the other's existence, as long as you had a guarantee that it existed on one OS and did not exist on the other. A quick and dirty fix, of course, but AWTDI. You may even want to test for the location of perl.exe - very unlikely to be in the same place on Windows and Linux. :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: How do I tell what OS I'm running under?
by OeufMayo (Curate) on Jan 14, 2001 at 20:35 UTC |