I have come across a bit of trouble with making a system call that involves a semicolon. I am doing a backtick system call in the following fashion:
my $output = `/usr/sbin/ubsetenv $currParam $formValue`;
$currParam is the name of the parameter and $formValue is the value to set the parameter to.
It works fine when $formValue doesn't have any semicolons, but when I put in an escaped semicolon (\;) to be used as the argument, it fails with no output. Note: semicolon is escaped for the purpose of the shell script, not perl.
An example input that causes it to fail is:
boot0\;boot1
I have verified that the input from the form is making it to the parsing script intact and have tried storing it to a variable first and viewing the command before executing the command with backticks around the variable. It appears that everything is making it fine up until the backtick command is called, at which point something happens causing it to fail.
Is there something weird about the use of backticks with semicolons that I have missed? Does anyone have any suggestions? Any help would be greatly appreciated.