We are getting somewhere here. I think I have to add code to support MacPerl and perl 
running under Windoze or DOS. Perhaps Parrot/Perl6 will fix it all up.

Using MPW on MacOS 9.1
perl -v
This is perl, version 5.004
perl -e 'print `uname`;'
### ToolServer - Command "uname" was not found. (Not surprising.)
perl -e 'print $^O;'
MacOS

Over on the MacPerl list the suggestion is to use Gestalt but I'll bet one can't do 
that until after the OS is determined somehow.

I donno about uname on a M$ box but $^O returns:
"MSWin32"   or   "dos"
depending on how the perl script is executed, booting into real DOS or emulated DOS 
under Windoze. Note the non-use of lowercase in both MacPerl and Windoze versions. I'm 
pretty sure it's Active Perl but I really don't know what's in use at the other end.

At 13:45 -0500 11/16/02, William H. Magill wrote:
>opsys=`uname -a | cut -d" " -f1`
>        print "         opsys = $opsys"
>case $opsys in
>        OSF1)         ?? DPM  Is that for Open Software Foundation - Linux?
>        SunOS)       ?? DPM  My ISP returns "solaris" for $^O in perl 5.00x but 
>"SunOS" using uname.
>        HP-UX)
>        AIX)
>        Darwin|darwin)
>esac


-- 

--> In Christianity, man can have only one wife. This is known as monotony. <--

Reply via email to