use Proc::Daemon; Proc::Daemon::Init; exec @ARGV; #### perl -MProc::Daemon -e 'Proc::Daemon::Init; exec @ARGV' some command here