I have different perl scripts who are launched from within a Perl script that run all independant what means if a certain Perl script is launched from within another Perl script that script have to be killed straight after launching the other script without leaving any trace. With the subroutine below I have been able to do this except for the fact that the Perl executable stay into memory which means that everytime I go through the subroutine below it creates a new Perl executable in memory so after a while I got a lot of Perl executables running. When I exit the Perl script currently active it will kill all remaining Perl.exe. Is their a way that I can launch another Perl script from within a Perl script killing that script without killing the system call to launch the other script. I know that it is very difficult explained to do something simple. It's basically automatic exiting a Perl script and launching another one. The scripts are not running from windows but from an application that has a Perl interface.

sub manual_gerber_auto { $W->destroy; system "perl $GENESIS_DIR/sys/edesign/scripts/input_manual.pl"; exit; }

In reply to How to reduce memory by killing redundant perl executables by juo

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.