Hi, I have a perl program , lets call it A.perl. In the perl , i call a sub routine(present in C.perl , C is available to A using "require") which sets up an array on its first call . Subsequent call to the sub routine , checks the array status and decides wht to do but it does not set the array again. This is working fine as long as the sub routine call is with in the perl A.perl. No when i call the perl B from A , and use the same sub routine whihc A used , I lose the array value set by A. The array is defines globally in C.perl. Every time i call be to B.perl the array is getting set again . I want to avoid this. What I feel is every time i call B from A , it creates a new unix shell where all the variable are re-set. How can i use the value set by A in other perls called by A. I tired execution B.perl using the following 3 ways .None worked out :( (1) using perl SYSTEM function (2) Using perl EXEC function (3) Using unix backticks. Please tell me how to solve this. Thank you, Deepu

In reply to Perl - unix process by Deeepu

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.