Build-wrapper make all command integrate with perl script

We have in house Perl script for building the project. We are trying to integrate the build wrapper command into it but getting errors.
SonarQube version: 8.9 LTS
CFamily plugin version:
Build Wrapper : we are using latest one which downloaded from : http://URL/static/cpp/
Build wrapper command: build-wrapper-linux-x86-64 --out-dir /home/cm/jenkins/workspace/RAISE-SonarQubeTrial/src/build_output make clean all

When i include this build wrapper command in Perl script , I was getting below error. Please let me know how to deal build wrapper command for perl script.

syntax error at /opt/tns/cm/scripts/buildscripts-Sonar/ line 401, near “–out”

Hi @kishore535 ,

Can you share the file? Or at least share 20 lines above and below line 401 in file? I’m not a Perl expert so I can only guess. I need to see how you are invoking build-wrapper in your script. Please share the entire error stack trace as well.

Attached the perl scriptProcessing:…
buildScript.txt (15.2 KB)

Hi @kishore535 ,

:warning: I’m not a Perl programmer, so please find someone else more knowledgeable.

There seems to be an issue with the syntax on line 401 (also there is no semicolon at the end of the line):

build-wrapper-linux-x86-64 --out-dir /home/cm/jenkins/workspace/RAISE-SonarQubeTrial/src/build_output make clean all

The syntax looks incorrect, I think you need to call the executable in a different manner like so:

my $cmd="build-wrapper-linux-x86-64 --out-dir /home/cm/jenkins/workspace/RAISE-SonarQubeTrial/src/build_output make clean all";


my cmd = `build-wrapper-linux-x86-64 --out-dir /home/cm/jenkins/workspace/RAISE-SonarQubeTrial/src/build_output make clean all`;

Here are more suggestions: How can I call a shell command in my Perl script? - Stack Overflow