Does the following work for anyone? use IPC::SysV qw(IPC_PRIVATE IPC_CREAT IPC_STAT GETVAL ); my $nid1 = semget(IPC_PRIVATE, 1, IPC_CREAT | 0666); # this returns an ID for me my $nid2 = semget($nid1, 1, 0666); # this one returns -1, but should have returned another handle to the semaphore. Maybe I'm missing something basic about how to use semaphores.