[please keep the posts on the list! thanks]

Devi .M wrote:
Hello,
I used IPC::Shareable for sharing 3 arrays between 2 process . Among those, 2 are 2D arrays and one is 3D array. Its woking fine for 2D
arrays but does not work for 3D array. If I modify the values in the 3D
array its not reflecting in the main script itself. I am struggling with
this for the past 2 days and could not find a solution. When I tried the
same thing with a simple script for 3D array it is working fine. Is there
anything with memory size? If so how we have to specify the size and how
can I get the size of an array. Kindly help me to overcome this.

Have you read the followup from Perrin on this thread? If not, check the archives.


To figure out the size see Devel::Size
http://search.cpan.org/search?query=devel%3A%3Asize&mode=module
and B::Size/B::TerseSize
http://search.cpan.org/search?query=b%3A%3Asize&mode=module

Devi .M wrote:

Hello All,
I have a perl script that would be running infinitely and updating
an array by processing some data. Now I would like to read the array
values that should not disturb this perl script.
I thought to use the concept of shared variable and write a method
in perl module which contains the array sharring with the infinitely
running perl script and return me the updated array values. But don't know how to proceed with this. Could anyone help me out?

I'm assuming that you need to connect to it from mod_perl, otherwise this question is quite offtopic here ;)


As suggested by Mark, IPC::Shareable might work if the data set is small. If it's big you can use a simple dbm to store the data in and with proper locking
read/write to/from it without disturbing each other.



__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com





--


__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com



Reply via email to