srinikar has asked for the wisdom of the Perl Monks concerning the following question:

Hi, Please let me know how I can call and pass arguments to a perl script running as a daemon. Thanks.

Replies are listed 'Best First'.
Re: How to pass arguments to a daemon
by moritz (Cardinal) on Jun 20, 2012 at 10:26 UTC
Re: How to pass arguments to a daemon
by rovf (Priest) on Jun 20, 2012 at 10:48 UTC
    In addition to what moritz said: A common way to pass data to a daemon is to use a config file. If you need to update the file while the daemon is running, a common practice is to send the daemon a SIGHUP. From the Perl side, this can be trapped by

    $SIG{HUP}=sub { .... };

    -- 
    Ronald Fischer <ynnor@mm.st>
Re: How to pass arguments to a daemon
by zentara (Cardinal) on Jun 20, 2012 at 10:55 UTC
Re: How to pass arguments to a daemon
by CountZero (Bishop) on Jun 20, 2012 at 22:46 UTC
    If you want to speak to daemons, a nice introduction is Ars Goetia which lists 72 different daemons and the rituals and incantations to use in conversing with them.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics