Does your editor support
syntax highlighting? Double quotes can't be nested in Perl, and backticks aren't paired inside double quotes as in the shell. Fortunately, Perl has the
qq operator:
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}');
But I'm not sure it works,
xl isn't a recognised command on my system.
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.
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]