I'd start by trying out the examples at perlipc.
In reply to Re: Bidirectional FIFO by fglock in thread Bidirectional FIFO by Segfault