in reply to Re: running command line from Perl
in thread running command line from Perl
You are right. I am using Powershell but CMD is standard.
I found this alternative for CMD:
wmic path win32_computersystemproduct get uuid #works in CMD
Still I do not get the principle from Perl for CMD
my $UUID = system ('wmic path win32_computersystemproduct get uuid');
No PS on macOS. I meant the way to call a command from Terminal works out-of-the-box. This works on macOS:
my ($UUID) = `ioreg -d2 -c IOPlatformExpertDevice` =~ /^.*\bIOPlatform +UUID\b.*"([^"]+)"\s*$/m or print "failed to parse ioreg";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: running command line from Perl
by LanX (Saint) on May 18, 2022 at 12:41 UTC | |
by Anonymous Monk on May 18, 2022 at 14:50 UTC | |
by NetWallah (Canon) on May 18, 2022 at 15:14 UTC | |
by LanX (Saint) on May 18, 2022 at 15:48 UTC | |
|
Re^3: running command line from Perl
by ikegami (Patriarch) on May 18, 2022 at 17:57 UTC | |
|
Re^3: running command line from Perl
by LanX (Saint) on May 18, 2022 at 12:12 UTC | |
by Anonymous Monk on May 18, 2022 at 12:44 UTC |