- or download this
my @winver = Win32::GetOSVersion();
print "Windows 2000" if $winver[1] == 5 and $winver[4] == 2;
- or download this
# I'm guessing at the major Windows versions for 9x here, but it shoul
+d be easy to test:
print "Windows 95" if $winver[1] == 1 and $winver[4] == 1;
print "Windows 98" if $winver[1] == 2 and $winver[4] == 1;
print "Windows Me" if $winver[1] == 3 and $winver[4] == 1;
- or download this
my $version_lookup = [
[], # Win32s (not sure what goes here)
...
my @winver = Win32::GetOSVersion();
printf "Operating System is %s", $version_lookup->[$winver[4]]->[$winv
+er[1]];
- or download this
print "I'm XP!!" if $winver[1] == 6 and $winver[4] == 2;