sleep

sleep EXPR sleep Causes the script to sleep for (integer) EXPR seconds, or forever if no argument is given. Returns the integer number of seconds actually slept. May be interrupted if the process receives a signal such as SIGALRM . eval { local $SIG{ALARM} = sub { die "Alarm!\n" }; sleep; }; die $@ unless $@ eq "Alarm!\n"; You probably cannot mix alarm and sleep calls, because sleep is often implemented using alarm. On some older systems, it may sleep up to a full second less than what

sigtrap - Perl pragma to enable simple signal handling

NAME SYNOPSIS DESCRIPTION OPTIONSSIGNAL HANDLERS SIGNAL LISTS OTHER EXAMPLES NAME sigtrap - Perl pragma to enable simple signal handling SYNOPSIS use sigtrap; use sigtrap qw(stack-trace old-interface-signals); # equivalent use sigtrap qw(BUS SEGV PIPE ABRT); use sigtrap qw(die INT QUIT); use sigtrap qw(die normal-signals); use sigtrap qw(die untrapped normal-signals); use sigtrap qw(die untrapped normal-signals stack-trace any error-signals); use sigtrap 'han

shmread

shmread ID,VAR,POS,SIZE

shmctl

shmctl ID,CMD,ARG Calls the System V IPC function shmctl. You'll probably have to say use IPC::SysV; first to get the correct constant definitions. If CMD is IPC_STAT , then ARG must be a variable that will hold the returned shmid_ds structure. Returns like ioctl: undef for error; "0 but true" for zero; and the actual return value otherwise. See also SysV IPC in perlipc and IPC::SysV documentation. Portability issues: shmctl in perlport.

shutdown

shutdown SOCKET,HOW Shuts down a socket connection in the manner indicated by HOW, which has the same interpretation as in the syscall of the same name. shutdown(SOCKET, 0); # I/we have stopped reading data shutdown(SOCKET, 1); # I/we have stopped writing data shutdown(SOCKET, 2); # I/we have stopped using this socket This is useful with sockets when you want to tell the other side you're done writing but not done reading, or vice versa. It's also a more insistent form of close becaus

shmget

shmget KEY,SIZE,FLAGS Calls the System V IPC function shmget. Returns the shared memory segment id, or undef on error. See also SysV IPC in perlipc and IPC::SysV documentation. Portability issues: shmget in perlport.

shmwrite

shmwrite ID,STRING,POS,SIZE Reads or writes the System V shared memory segment ID starting at position POS for size SIZE by attaching to it, copying in/out, and detaching from it. When reading, VAR must be a variable that will hold the data read. When writing, if STRING is too long, only SIZE bytes are used; if STRING is too short, nulls are written to fill out SIZE bytes. Return true if successful, false on error. shmread() taints the variable. See also SysV IPC in perlipc, IPC::SysV , and the

Shift Operators

Shift Operators Binary "<<" returns the value of its left argument shifted left by the number of bits specified by the right argument. Arguments should be integers. (See also Integer Arithmetic.) Binary ">>" returns the value of its left argument shifted right by the number of bits specified by the right argument. Arguments should be integers. (See also Integer Arithmetic.) Note that both << and >> in Perl are implemented directly using << and >> in C. If us

shift

shift ARRAY shift EXPR shift Shifts the first value of the array off and returns it, shortening the array by 1 and moving everything down. If there are no elements in the array, returns the undefined value. If ARRAY is omitted, shifts the @_ array within the lexical scope of subroutines and formats, and the @ARGV array outside a subroutine and also within the lexical scopes established by the eval STRING , BEGIN {} , INIT {} , CHECK {} , UNITCHECK {} , and END {} constructs. Starting with Perl

setservent

setservent STAYOPEN