Quite possibly it is me who is misreading the question, but I have the feeling that you've received complicated answers to a very simple question (and to a question calling for a much simpler answer). I reread again twice the original question and I really think it was misunderstood.

My understanding of your question is the following (making it a bit simpler to better clarify): suppose that I have a Perl program running and taking, say, 24 hours to execute. While this job has been running for, say, 12 hours, I want to fire another instance of the same program, but after having modified the code. Will this affect the job that is already running?

If my understanding is correct, then the answer is no, it will not affect the job already running (which will continue to use the old code), and the new job will use new code. The reason for that is that when you fire a Perl program, Perl reads the source into memory, compiles it in memory and generates some form of internal code, and then runs that internal code. Once the internal code has been generated, Perl will not go back to the source code. So the program already running will not be affected by a change in the file containing the source code, because it is never going to go and look at it again. And the new program will happily take the (new) source code as it is when it is launched. So you should not run into any problem.

My apologies if it is me who misunderstood the original question.

Je suis Charlie.

In reply to Re: Update a perl script when its running by Laurent_R
in thread Update a perl script when its running by samrkl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.