Perl Cheat Sheet Page 22

ADVERTISEMENT

msgget KEY, FLAGS
Creates a message queue for
KEY
. Returns the message queue identifier.
msgsnd ID, MSG, FLAGS
Sends
MSG
to queue
ID
.
msgrcv ID,
VAR, SIZE, TYPE, FLAGS
$
Receives a message from queue
ID
into
VAR
.
semctl ID, SEMNUM, CMD, ARG
Calls semctl(2).
If
CMD
is IPC_STAT or GETALL then
ARG
must be a variable.
semget KEY, NSEMS, SIZE, FLAGS
Creates a set of semaphores for
. Returns the message semaphore
KEY
identifier.
...
semop KEY,
Performs semaphore operations.
shmctl ID, CMD, ARG
Calls shmctl(2). If
is IPC_STAT then
must be a single variable.
CMD
ARG
shmget KEY, SIZE, FLAGS
Creates shared memory. Returns the shared memory segment identifier.
shmread ID,
$
VAR, POS, SIZE
Reads at most
SIZE
bytes of the contents of shared memory segment
ID
starting at offset
POS
into
VAR
.
shmwrite ID, STRING, POS, SIZE
Writes at most
SIZE
bytes of
STRING
into the contents of shared memory
segment
ID
at offset
POS
.
25. Miscellaneous
y
defined EXPR
Tests whether the
EXPR
has an actual value.
do FILENAME
Executes
as a Perl script. See also
in section
FILENAME
require
‘Subroutines, packages and modules’.
[
]
dump
LABEL
Immediate core dump. When reincarnated, starts at
.
LABEL
. . . }
eval
{
EXPR;
Executes the code between { and } . Traps run-time errors as described with
eval(EXPR)
, section ‘String functions’.
local VAR
Creates a scope for
local to the enclosing block, subroutine or
.
VAR
eval
my VAR
Creates a scope for the variable lexically local to the enclosing block,
subroutine or
eval
.
y
ref EXPR
Returns a true value if
EXPR
is a reference. Returns the package name if
EXPR
has been blessed into a package.
reset
[
EXPR
]
Resets ?? searches so that they work again.
is a list of single letters.
EXPR
All variables and arrays beginning with one of those letters are reset to their
pristine state. Only affects the current package.
22

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education