> $^O is *not* the name of the OS on which perl runs, but on which it was > built. If you take e.g. ActivePerl, it's binary download is the same for > all supported versions of Windows.
In MKS perl $^O returns Windows_NT on Windows NT (I think MKS perl is not ActivePerl) So, i use the following code snippet..... # In MKS perl on NT this is necessary due to a bug in basename() # It doesn't understand Windows_NT and must be told MSWin32 # or pathnames don't work. use File::Basename; if ($^O eq "Windows_NT") { fileparse_set_fstype("MSWin32"); } Cheers Mayank Timothy Johnson wrote: > > I don't have it with me, but if you're on a Win32 system, you can use the > Win32 module that ships standard to determine the OS version. > > -----Original Message----- > From: Felix Geerinckx [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 09, 2002 9:12 AM > To: [EMAIL PROTECTED] > Subject: Re: OS Name > > on Thu, 09 May 2002 15:27:41 GMT, Shishir K. Singh wrote: > > > Is $OSNAME or $^O for windows = "MSWin32" for all the Windows version > > (95, NT, 2000, XP) ?? > > >From perldoc perlvar: > > $^O The name of the operating system under which this copy of Perl > was built, as determined during the configuration process. The > value is identical to "$Config{'osname'}". See also the Config > manpage and the -V command-line switch documented in the perlrun > manpage. > > $^O is *not* the name of the OS on which perl runs, but on which it was > built. If you take e.g. ActivePerl, it's binary download is the same for > all supported versions of Windows. Therefore, $^O will be the same also > (i.e. "MSWin32"). > > -- > felix > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Regards Mayank "The difference between ordinary and extraordinary is that little extra" -Anon -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]