ajeet@perl has asked for the wisdom of the Perl Monks concerning the following question:
I am using forks module from CPAN, I get error when i write
$queue[0] = [1,2,3,4];
where, i delared $queue as shared variable, actually i wanted to store 1,2,3,4 in second dimension of array. It gives me arror as..
Invalid value for shared scalar at ./emsNBIAlarmListener.pl line 107 at /usr/local/lib/perl5/site_perl/5.8.8/sun4-solaris/forks/shared.pm +line 563 threads::shared::STORE('threads::shared=HASH(0x872e10)', 0, 'A +RRAY(0x435190)') called at ./emsNBIAlarmListener.pl line 107
But,When i write...
$queue[0] = \[1,2,3,4];
I get no error, but i dont know how to access the values now in first or second dimension....
Please Help me ...
Thank You Monks..
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: sharing array references through fork::shared
by cdarke (Prior) on Apr 10, 2010 at 16:14 UTC | |
by ajeet@perl (Acolyte) on Apr 11, 2010 at 09:33 UTC |