in reply to Re: Read UUID on macOS from script
in thread Read UUID on macOS from script

I can confirm that...

my ($UUID) = `ioreg -d2 -c IOPlatformExpertDevice` =~ /^.*\bIOPlatformUUID\b.*"([^"]+)"\s*$/m or die "failed to parse ioreg";

...works on my Macbook.