If you are using require, then really you are treating C.perl as a module. It's more conventional to use a .pm extension and use use. But in either case what you are doing is somewhat like a #include in C - in a sense you are including the (compiled) source of C.perl in the execution space of A.perl. If you run B.perl as a separate process the B.perl process does not have access to the execution context of A.perl and thus does not have access to the array tucked away in C.perl.

You need to tell us something of the bigger picture and what you are trying to achieve at a higher level. You should also put together a little sample code to demonstrate what you are trying to do. Acme::ESP is currently a little flaky so it doesn't always help with this sort of question (although no-one is reporting bugs - we just expect the module's developers to know).


True laziness is hard work

In reply to Re: Perl - unix process by GrandFather
in thread 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.