How to run a bash command in the background from perl script
I have a perl script that checks to see if the tape drive is on and sends a message to a windows machine and a Linux machine if it finds any problem.
I use smbclient to send the message to the windows machine. No Problem.
I am using xmessage to send the message to the linux machine.
I need xmessage to run in the background and continue on with the rest of the script.
From the command line I would just do something like this:
xmessage -display pos:1 "Error message here..." &
The ampersand (&) at the end would put the process into the background.
My perl script seems to ignore this character and therefore not put the xmessage program in the background. It is called like this:
<some perl code here>
`xmessage -display pos1:0 "Error message here" &`;
<more perl code here>
can anyone help?