in reply to A problem with variables inside a system() call

If program blah really wants input on STDIN then it may be instructive for you to change your $command to "/bin/cat".

OTOH, if blah actually wants those strings on the command line you need to make a change:

$UPDATE = `$command << EOF`; $variable is the value from DB. $variable is less that $threshold EOF
In this case you would test by changing $command to "/bin/echo".