in reply to Get macOS Version
That information should be easily accessible using System::Info, which should work on most (if not all) supported OS's:
$ perl -MData::Dumper -MSystem::Info=sysinfo_hash -wE'print Dumper (sy +sinfo_hash)' $VAR1 = { 'cpu_cores' => '2', 'cpu' => 'Mac mini (2 GHz)', 'hostname' => 'myhostname.local', 'osname' => 'Darwin', 'distro' => 'Darwin 17.0.0', 'cpu_type' => 'x86_64', 'osvers' => '17.0.0', 'os' => 'darwin - 17.0.0 (Mac OS X - macOS 10.13 (17A365))', 'cpu_count' => '1 [2 cores]' };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Get macOS Version
by 1nickt (Canon) on Oct 26, 2018 at 12:50 UTC | |
by Tux (Canon) on Jul 11, 2019 at 12:13 UTC |