in reply to system commands/shell and perl variables.
But I'm not sure it works, xl isn't a recognised command on my system.my $XENDOMID = qq(xl list| DOM_ID=`fgrep $vm_run` | awk '{print $2}'` +&& VNCPORT=`ps x \ | fgrep -m 1 "domid $DOM_ID" | awk '{print $1}'` && sockstat -4l | fgr +ep $VNCPORT | awk '{print $6}');
Calling grep and awk from perl seems suspicious. Perl can do most of the operations these commands do, and without shelling out to run them, it's usually faster. Please provide a SSCCE so we can help you more.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: system commands/shell and perl variables.
by NetWallah (Canon) on Jan 22, 2019 at 06:42 UTC |