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