semop

semop KEY,OPSTRING Calls the System V IPC function semop(2) for semaphore operations such as signalling and waiting. OPSTRING must be a packed array of semop structures. Each semop structure can be generated with pack("s!3", $semnum, $semop, $semflag) . The length of OPSTRING implies the number of semaphore operations. Returns true if successful, false on error. As an example, the following code waits on semaphore $semnum of semaphore id $semid: $semop = pack("s!3", $semnum, -1, 0); die "Semaph

semget

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, IPC::SysV , IPC::SysV::Semaphore documentation. Portability issues: semget in perlport.

SelfLoader - load functions only on demand

NAME SYNOPSIS DESCRIPTIONThe __DATA__ token SelfLoader autoloading Autoloading and package lexicals SelfLoader and AutoLoader __DATA__, __END__, and the FOOBAR::DATA filehandle. Classes and inherited methods. Multiple packages and fully qualified subroutine names AUTHOR COPYRIGHT AND LICENSE NAME SelfLoader - load functions only on demand SYNOPSIS package FOOBAR; use SelfLoader; ... (initializing code) __DATA__ sub {.... DESCRIPTION This module tells its users that functions in the FOOBA

semctl

semctl ID,SEMNUM,CMD,ARG Calls the System V IPC function semctl(2). You'll probably have to say use IPC::SysV; first to get the correct constant definitions. If CMD is IPC_STAT or GETALL, then ARG must be a variable that will hold the returned semid_ds structure or semaphore value array. Returns like ioctl: the undefined value for error, "0 but true" for zero, or the actual return value otherwise. The ARG must consist of a vector of native short integers, which may be created with pack("s!",(0

select

select FILEHANDLE select Returns the currently selected filehandle. If FILEHANDLE is supplied, sets the new current default filehandle for output. This has two effects: first, a write or a print without a filehandle default to this FILEHANDLE. Second, references to variables related to output will refer to this output channel. For example, to set the top-of-form format for more than one output channel, you might do the following: select(REPORT1); $^ = 'report1_top'; select(REPORT2); $^ = 'repor

seekdir

seekdir DIRHANDLE,POS Sets the current position for the readdir routine on DIRHANDLE. POS must be a value returned by telldir. seekdir also has the same caveats about possible directory compaction as the corresponding system library routine.

seek

seek FILEHANDLE,POSITION,WHENCE Sets FILEHANDLE's position, just like the fseek call of stdio . FILEHANDLE may be an expression whose value gives the name of the filehandle. The values for WHENCE are 0 to set the new position in bytes to POSITION; 1 to set it to the current position plus POSITION; and 2 to set it to EOF plus POSITION, typically negative. For WHENCE you may use the constants SEEK_SET , SEEK_CUR , and SEEK_END (start of the file, current position, end of the file) from the Fcntl

SelectSaver - save and restore selected file handle

NAME SYNOPSIS DESCRIPTION NAME SelectSaver - save and restore selected file handle SYNOPSIS use SelectSaver; { my $saver = SelectSaver->new(FILEHANDLE); # FILEHANDLE is selected } # previous handle is selected { my $saver = SelectSaver->new; # new handle may be selected, or not } # previous handle is selected DESCRIPTION A SelectSaver object contains a reference to the file handle that was selected when it was created. If its new method gets an extra parameter, then that

SDBM_File - Tied access to sdbm files

NAME SYNOPSIS DESCRIPTIONTie EXPORTS DIAGNOSTICSsdbm store returned -1, errno 22, key "..." at ... BUGS AND WARNINGS NAME SDBM_File - Tied access to sdbm files SYNOPSIS use Fcntl; # For O_RDWR, O_CREAT, etc. use SDBM_File; tie(%h, 'SDBM_File', 'filename', O_RDWR|O_CREAT, 0666) or die "Couldn't tie SDBM file 'filename': $!; aborting"; # Now read and change the hash $h{newkey} = newvalue; print $h{oldkey}; ... untie %h; DESCRIPTION SDBM_File establishes a connection between a Perl ha

Search::Dict - look - search for key in dictionary file

NAME SYNOPSIS DESCRIPTION NAME Search::Dict - look - search for key in dictionary file SYNOPSIS use Search::Dict; look *FILEHANDLE, $key, $dict, $fold; use Search::Dict; look *FILEHANDLE, $params; DESCRIPTION Sets file position in FILEHANDLE to be first line greater than or equal (stringwise) to $key. Returns the new file position, or -1 if an error occurs. The flags specify dictionary order and case folding: If $dict is true, search by dictionary order (ignore anything but word characters