in reply to SysV shared memory --pure perl

The unpack doesn't work for me. $segment_size is returned with a huge negative value (causing it to die with a "bad adress" error). $shmbuffer seemds to be in order, but I haven't been able to fix this yet. Any ideas?
I'm desperate for easy shared memory operation, and this snippet is pretty close to the results of my own attempts, but it yields the same error. Maybe it's a Solaris problem for me. I'll test it on other machines.

Replies are listed 'Best First'.
Re^2: SysV shared memory --pure perl
by KennyK (Novice) on Nov 19, 2012 at 18:40 UTC
    I have been using Storable's freeze and thaw instead of pack and unpack for random data formats. Works fine so far.
Re^2: SysV shared memory --pure perl
by zentara (Cardinal) on Jul 12, 2006 at 15:50 UTC
    I just tested this again on linux with Perl 5.8.8 and it works. I don't know what to tell you, except try different unpack modes. Maybe its a 64-bit vs. 32-bit or endian problem?

    I'm not really a human, but I play one on earth. Cogito ergo sum a bum