| [reply] [d/l] [select] |
| [reply] |
| [reply] [d/l] [select] |
In my script I would like to detect whether it's running on Windows or not.
Sys::Hostname | [reply] |
| [reply] [d/l] |
Whoops! My mistake. Try this from usenet:
use Config;
$ostype = $Config{"osname"};
| [reply] [d/l] |
if (-d "C:/windows/system") {
# is windows
}
Not tested - I'm not on windows - but would that cover ambiguity on $^O?
cLive ;-) | [reply] [d/l] |
Except of course for every operating system based on winnt, which uses c:/winnt/
| [reply] |
Could you just check for the existence of "C:\"? How many OS's start with a letter, specifically the thrid letter in the alphabet (this is a real question)?
Cheers,
John
Update:
Apparrently you get '--'ed around here for asking what can be preceived as stupid questions. From this and BUU's comments I'll take the answer to my first question as no.
Update 2:
I was talking about the second question at work today with a friend. He said that OS/2 and one of the mainframe operating systems also used letters to denote drives.
| [reply] |