#!/usr/bin/perl use IPC::SysV qw(IPC_PRIVATE IPC_CREAT IPC_NOWAIT); use IPC::Msg; use Data::Dumper; use strict; use warnings; my $msgtype = 1; my $message = "hello nr "; my $messages = 2000; my $buf; my $msg = new IPC::Msg('24h', IPC_CREAT); $msg->set('qbytes' => 32768); for (my $i = 0; $i < $messages; $i++) { my $rv = $msg->snd($msgtype, pack("L a*",$msgtype,$message . $i), IPC_NOWAIT); print "rv of $i is $rv\n" } while ($msg->rcv($buf,256, $msgtype, IPC_NOWAIT)) { print "$buf\n"; }