Thanks to visit codestin.com
Credit goes to perldoc.perl.org

You are viewing the version of this documentation from Perl blead. This is the main development branch of Perl. (git commit ce96f1e9d09c4b403485f0d292be07d6effd030a)
semget KEY,NSEMS,FLAGS

Calls the System V IPC function semget(2). Returns the semaphore id, or the undefined value on error. See also "SysV IPC" in perlipc and the documentation for IPC::SysV and IPC::Semaphore.

Portability issues: "semget" in perlport.