in reply to Re^2: running command line from Perl
in thread running command line from Perl
ehm ... works for me °,
C:\tmp>perl print system ('wmic path win32_computersystemproduct get uuid'); __END__ UUID 2DA054C5-6464-11EC-8B14-A054C44A693E 0 C:\tmp>
... but you need to extract the second line from the output.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
°) sorry, the demo is misleading, see Re^6: running command line from Perl
a working approach is:
C:\tmp>perl $a=qx(wmic path win32_computersystemproduct get uuid); print "<<<$a>>>"; __END__ <<<UUID 2DA054C5-6464-11EC-8B14-A054C44A693E >>> C:\tmp>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: running command line from Perl
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 |