in reply to Re: Restart Long Running Perl Script
in thread Restart Long Running Perl Script

I have to restart, as the FTP server could provide completely different script than the one currently running. Will exec $0 work on Win32 ?

Replies are listed 'Best First'.
Re^3: Restart Long Running Perl Script
by BrowserUk (Patriarch) on Feb 13, 2006 at 13:41 UTC
    Will exec $0 work on Win32 ?

    Yes.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
Re^3: Restart Long Running Perl Script
by zentara (Cardinal) on Feb 13, 2006 at 13:22 UTC
    I don't know much about windows, but if it dosn't work, you could try
    sub restart{ system(1, $0); # windows trick to launch a new process exit; # will need to exit original script }
    but maybe the windows experts will know something better.

    I'm not really a human, but I play one on earth. flash japh