I am running script with arguments inside the perl script. script and arguments are enclosed with backticks. When I use '&' symbol at last after arguments, the command is not running on background, it is running on foreground. can someone find the mistake in my program. I need to save the output and redirect the same to one variable and then to log.
Below is the code of mine:
open (MYSM, "> /logs/${SM}.smlog");
open (MYSP, "> /logs/${SM}.splog");
$SM_LOG_VAR = ` ./sm.sh $SE_VER $SMS_VERSION & ` ;
$SP_LOG_VAR = ` ./sp.sh $SE_VER $SMS_VERSION ` ;
print MYSM $SM_LOG_VAR ;
print MYSP $SP_LOG_VAR ;
close(MYSM);
close(MYSP);
The line :
$SM_LOG_VAR = ` ./sm.sh $SE_VER $SMS_VERSION & ` ;
is not running in background which is completely enclosed with backticks.