in reply to sending variables to a script running in a bg

This sounds to me like a classic ipc problem. Have a look at perlipc.
  • Comment on Re: sending variables to a script running in a bg