The SysV IPC code above was written long ago, and it's definitely clunky looking. It should at the very least be made to use strict and require "sys/ipc.ph". Better yet, perhaps someone should create an IPC::SysV module the way we have the Socket module for normal client-server communications.

(... time passes)

Voila! Check out the IPC::SysV modules written by Jack Shirazi. You can find them at a CPAN store near you.