Very Cool,

on my iMini

Gestalt says it's 10.4.9
osascript/fider says 10.4.7
sw_version 10.4.11

the latter is correct :-)-O

on 10/16/07 2:52 AM Chris Nandor said the following:
> In article <[EMAIL PROTECTED]>,
>  [EMAIL PROTECTED] (David Cantrell) wrote:
> 
>> Is there any simple way that people can think of to detect which major
>> version of OS X my perl code is running on?
>>
>> ie whether it's 10.0, 10.1 etc, I don't care about the difference
>> between 10.3.3 and 10.3.4.
> 
> This is nice in that it doesn't depend on external processes (sw_vers, 
> Finder) or files.
> 
>    use Mac::Gestalt qw(%Gestalt gestaltSystemVersion);
>    (my $version = sprintf("%x", $Gestalt{gestaltSystemVersion()})) =~
>       s/^(\d+)(\d)(\d)$/$1.$2.$3/;
> 


-- 
If you want to email me, replace nospam with el

Reply via email to