I am trying to call a bash script in perl, by doing this -
my $which_mpi = "/sw/tools/tacc/builds/carter/site/salt_which_mpi";
$mpi_stack = system("$which_mpi",-n);
the problem is that I want the script to execute when it is called by system command in line
$mpi_stack = system("$which_mpi",-n);
but the problem with this is while assigning the path in $which_mpi it automatically executes the script. So instead of me getting this value
WHICH_MPI : /sw/tools/salt/builds/carter/altd/bin/site/salt_which_mpi
I am getting the path with the output of the bash script like
WHICH_MPI : /sw/tools/salt/builds/carter/altd/bin/site/salt_which_mpiopenmpi 1.6.1
where openmpi 1.6.1
is the output of my salt_which_mpi bash script.