Cari di Perl 
    Perl Manual & Tutorial
Daftar Isi
 Perl Operators (Berikutnya)

Perl Reference Manual

Daftar Isi


Overview


Tutorials


FAQs


History / Changes


License


Language Reference


Perl Functions A-Z

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

A

  • AUTOLOAD
  • abs - absolute value function
  • accept - accept an incoming socket connect
  • alarm - schedule a SIGALRM
  • and
  • atan2 - arctangent of Y/X in the range -PI to PI

B

  • BEGIN
  • bind - binds an address to a socket
  • binmode - prepare binary files for I/O
  • bless - create an object
  • break - break out of a "given" block

C

  • CHECK
  • caller - get context of the current subroutine call
  • chdir - change your current working directory
  • chmod - changes the permissions on a list of files
  • chomp - remove a trailing record separator from a string
  • chop - remove the last character from a string
  • chown - change the owership on a list of files
  • chr - get character this number represents
  • chroot - make directory new root for path lookups
  • close - close file (or pipe or socket) handle
  • closedir - close directory handle
  • cmp
  • connect - connect to a remote socket
  • continue - optional trailing block in a while or foreach
  • cos - cosine function
  • crypt - one-way passwd-style encryption

D

  • DESTROY
  • __DATA__
  • dbmclose - breaks binding on a tied dbm file
  • dbmopen - create binding on a tied dbm file
  • default
  • defined - test whether a value, variable, or function is defined
  • delete - deletes a value from a hash
  • die - raise an exception or bail out
  • do - turn a BLOCK into a TERM
  • dump - create an immediate core dump

E

F

  • __FILE__
  • fc
  • fcntl - file control system call
  • fileno - return file descriptor from filehandle
  • flock - lock an entire file with an advisory lock
  • for
  • foreach
  • fork - create a new process just like this one
  • format - declare a picture format with use by the write() function
  • formline - internal function used for formats

G

H

  • hex - convert a string to a hexadecimal number

I

  • INIT
  • if
  • import - patch a module's namespace into your own
  • index - find a substring within a string
  • int - get the integer portion of a number
  • ioctl - system-dependent device control system call

J

  • join - join a list into a string using a separator

K

  • keys - retrieve list of indices from a hash
  • kill - send a signal to a process or process group

L

  • __LINE__
  • last - exit a block prematurely
  • lc - return lower-case version of a string
  • lcfirst - return a string with just the next letter in lower case
  • le
  • length - return the number of bytes in a string
  • link - create a hard link in the filesytem
  • listen - register your socket as a server
  • local - create a temporary value for a global variable (dynamic scoping)
  • localtime - convert UNIX time into record or string using local time
  • lock - get a thread lock on a variable, subroutine, or method
  • log - retrieve the natural logarithm for a number
  • lstat - stat a symbolic link
  • lt

M

  • m - match a string with a regular expression pattern
  • map - apply a change to a list to get back a new list with the changes
  • mkdir - create a directory
  • msgctl - SysV IPC message control operations
  • msgget - get SysV IPC message queue
  • msgrcv - receive a SysV IPC message from a message queue
  • msgsnd - send a SysV IPC message to a message queue
  • my - declare and assign a local variable (lexical scoping)

N

  • ne
  • next - iterate a block prematurely
  • no - unimport some module symbols or semantics at compile time
  • not

O

  • oct - convert a string to an octal number
  • open - open a file, pipe, or descriptor
  • opendir - open a directory
  • or
  • ord - find a character's numeric representation
  • our - declare and assign a package variable (lexical scoping)

P

  • __PACKAGE__
  • pack - convert a list into a binary representation
  • package - declare a separate global namespace
  • pipe - open a pair of connected filehandles
  • pop - remove the last element from an array and return it
  • pos - find or set the offset for the last/next m//g search
  • print - output a list to a filehandle
  • printf - output a formatted list to a filehandle
  • prototype - get the prototype (if any) of a subroutine
  • push - append one or more elements to an array

Q

  • q - singly quote a string
  • qq - doubly quote a string
  • qr - Compile pattern
  • quotemeta - quote regular expression magic characters
  • qw - quote a list of words
  • qx - backquote quote a string

R

  • rand - retrieve the next pseudorandom number
  • read - fixed-length buffered input from a filehandle
  • readdir - get a directory from a directory handle
  • readline - fetch a record from a file
  • readlink - determine where a symbolic link is pointing
  • readpipe - execute a system command and collect standard output
  • recv - receive a message over a Socket
  • redo - start this loop iteration over again
  • ref - find out the type of thing being referenced
  • rename - change a filename
  • require - load in external functions from a library at runtime
  • reset - clear all variables of a given name
  • return - get out of a function early
  • reverse - flip a string or a list
  • rewinddir - reset directory handle
  • rindex - right-to-left substring search
  • rmdir - remove a directory

S

  • __SUB__
  • s - replace a pattern with a string
  • say - print with newline
  • scalar - force a scalar context
  • seek - reposition file pointer for random-access I/O
  • seekdir - reposition directory pointer
  • select - reset default output or do I/O multiplexing
  • semctl - SysV semaphore control operations
  • semget - get set of SysV semaphores
  • semop - SysV semaphore operations
  • send - send a message over a socket
  • setgrent - prepare group file for use
  • sethostent - prepare hosts file for use
  • setnetent - prepare networks file for use
  • setpgrp - set the process group of a process
  • setpriority - set a process's nice value
  • setprotoent - prepare protocols file for use
  • setpwent - prepare passwd file for use
  • setservent - prepare services file for use
  • setsockopt - set some socket options
  • shift - remove the first element of an array, and return it
  • shmctl - SysV shared memory operations
  • shmget - get SysV shared memory segment identifier
  • shmread - read SysV shared memory
  • shmwrite - write SysV shared memory
  • shutdown - close down just half of a socket connection
  • sin - return the sine of a number
  • sleep - block for some number of seconds
  • socket - create a socket
  • socketpair - create a pair of sockets
  • sort - sort a list of values
  • splice - add or remove elements anywhere in an array
  • split - split up a string using a regexp delimiter
  • sprintf - formatted print into a string
  • sqrt - square root function
  • srand - seed the random number generator
  • stat - get a file's status information
  • state - declare and assign a state variable (persistent lexical scoping)
  • study - optimize input data for repeated searches
  • sub - declare a subroutine, possibly anonymously
  • substr - get or alter a portion of a stirng
  • symlink - create a symbolic link to a file
  • syscall - execute an arbitrary system call
  • sysopen - open a file, pipe, or descriptor
  • sysread - fixed-length unbuffered input from a filehandle
  • sysseek - position I/O pointer on handle used with sysread and syswrite
  • system - run a separate program
  • syswrite - fixed-length unbuffered output to a filehandle

T

  • tell - get current seekpointer on a filehandle
  • telldir - get current seekpointer on a directory handle
  • tie - bind a variable to an object class
  • tied - get a reference to the object underlying a tied variable
  • time - return number of seconds since 1970
  • times - return elapsed time for self and child processes
  • tr - transliterate a string
  • truncate - shorten a file

U

  • UNITCHECK
  • uc - return upper-case version of a string
  • ucfirst - return a string with just the next letter in upper case
  • umask - set file creation mode mask
  • undef - remove a variable or function definition
  • unless
  • unlink - remove one link to a file
  • unpack - convert binary structure into normal perl variables
  • unshift - prepend more elements to the beginning of a list
  • untie - break a tie binding to a variable
  • until
  • use - load in a module at compile time
  • utime - set a file's last access and modify times

V

  • values - return a list of the values in a hash
  • vec - test or set particular bits in a string

W

  • wait - wait for any child process to die
  • waitpid - wait for a particular child process to die
  • wantarray - get void vs scalar vs list context of current subroutine call
  • warn - print debugging info
  • when
  • while
  • write - print a picture record

X

  • -X - a file test (-r, -x, etc)
  • x
  • xor

Y

  • y - transliterate a string

Perl Functions by Category

Functions for SCALARs or strings

  • chomp - remove a trailing record separator from a string
  • chop - remove the last character from a string
  • chr - get character this number represents
  • crypt - one-way passwd-style encryption
  • hex - convert a string to a hexadecimal number
  • index - find a substring within a string
  • lc - return lower-case version of a string
  • lcfirst - return a string with just the next letter in lower case
  • length - return the number of bytes in a string
  • oct - convert a string to an octal number
  • ord - find a character's numeric representation
  • pack - convert a list into a binary representation
  • q/STRING/ - singly quote a string
  • qq/STRING/ - doubly quote a string
  • reverse - flip a string or a list
  • rindex - right-to-left substring search
  • sprintf - formatted print into a string
  • substr - get or alter a portion of a stirng
  • tr/// - transliterate a string
  • uc - return upper-case version of a string
  • ucfirst - return a string with just the next letter in upper case
  • y/// - transliterate a string

Regular expressions and pattern matching

  • m// - match a string with a regular expression pattern
  • pos - find or set the offset for the last/next m//g search
  • qr/STRING/ - Compile pattern
  • quotemeta - quote regular expression magic characters
  • s/// - replace a pattern with a string
  • split - split up a string using a regexp delimiter
  • study - optimize input data for repeated searches

Numeric functions

  • abs - absolute value function
  • atan2 - arctangent of Y/X in the range -PI to PI
  • cos - cosine function
  • exp - raise I to a power
  • hex - convert a string to a hexadecimal number
  • int - get the integer portion of a number
  • log - retrieve the natural logarithm for a number
  • oct - convert a string to an octal number
  • rand - retrieve the next pseudorandom number
  • sin - return the sine of a number
  • sqrt - square root function
  • srand - seed the random number generator

Functions for real @ARRAYs

  • pop - remove the last element from an array and return it
  • push - append one or more elements to an array
  • shift - remove the first element of an array, and return it
  • splice - add or remove elements anywhere in an array
  • unshift - prepend more elements to the beginning of a list

Functions for list data

  • grep - locate elements in a list test true against a given criterion
  • join - join a list into a string using a separator
  • map - apply a change to a list to get back a new list with the changes
  • qw/STRING/ - quote a list of words
  • reverse - flip a string or a list
  • sort - sort a list of values
  • unpack - convert binary structure into normal perl variables

Functions for real %HASHes

  • delete - deletes a value from a hash
  • each - retrieve the next key/value pair from a hash
  • exists - test whether a hash key is present
  • keys - retrieve list of indices from a hash
  • values - return a list of the values in a hash

Input and output functions

  • binmode - prepare binary files for I/O
  • close - close file (or pipe or socket) handle
  • closedir - close directory handle
  • dbmclose - breaks binding on a tied dbm file
  • dbmopen - create binding on a tied dbm file
  • die - raise an exception or bail out
  • eof - test a filehandle for its end
  • fileno - return file descriptor from filehandle
  • flock - lock an entire file with an advisory lock
  • format - declare a picture format with use by the write() function
  • getc - get the next character from the filehandle
  • print - output a list to a filehandle
  • printf - output a formatted list to a filehandle
  • read - fixed-length buffered input from a filehandle
  • readdir - get a directory from a directory handle
  • readline - fetch a record from a file
  • rewinddir - reset directory handle
  • seek - reposition file pointer for random-access I/O
  • seekdir - reposition directory pointer
  • select - reset default output or do I/O multiplexing
  • syscall - execute an arbitrary system call
  • sysread - fixed-length unbuffered input from a filehandle
  • sysseek - position I/O pointer on handle used with sysread and syswrite
  • syswrite - fixed-length unbuffered output to a filehandle
  • tell - get current seekpointer on a filehandle
  • telldir - get current seekpointer on a directory handle
  • truncate - shorten a file
  • warn - print debugging info
  • write - print a picture record

Functions for fixed length data or records

  • pack - convert a list into a binary representation
  • read - fixed-length buffered input from a filehandle
  • syscall - execute an arbitrary system call
  • sysread - fixed-length unbuffered input from a filehandle
  • sysseek - position I/O pointer on handle used with sysread and syswrite
  • syswrite - fixed-length unbuffered output to a filehandle
  • unpack - convert binary structure into normal perl variables
  • vec - test or set particular bits in a string

Functions for filehandles, files, or directories

  • -X - a file test (-r, -x, etc)
  • chdir - change your current working directory
  • chmod - changes the permissions on a list of files
  • chown - change the owership on a list of files
  • chroot - make directory new root for path lookups
  • fcntl - file control system call
  • glob - expand filenames using wildcards
  • ioctl - system-dependent device control system call
  • link - create a hard link in the filesytem
  • lstat - stat a symbolic link
  • mkdir - create a directory
  • open - open a file, pipe, or descriptor
  • opendir - open a directory
  • readlink - determine where a symbolic link is pointing
  • rename - change a filename
  • rmdir - remove a directory
  • stat - get a file's status information
  • symlink - create a symbolic link to a file
  • sysopen - open a file, pipe, or descriptor
  • umask - set file creation mode mask
  • unlink - remove one link to a file
  • utime - set a file's last access and modify times

Keywords related to control flow of your perl program

  • caller - get context of the current subroutine call
  • continue - optional trailing block in a while or foreach
  • die - raise an exception or bail out
  • do - turn a BLOCK into a TERM
  • dump - create an immediate core dump
  • eval - catch exceptions or compile and run code
  • exit - terminate this program
  • goto - create spaghetti code
  • last - exit a block prematurely
  • next - iterate a block prematurely
  • prototype - get the prototype (if any) of a subroutine
  • redo - start this loop iteration over again
  • return - get out of a function early
  • sub - declare a subroutine, possibly anonymously
  • wantarray - get void vs scalar vs list context of current subroutine call

Keywords altering or affecting scoping of identifiers

  • caller - get context of the current subroutine call
  • import - patch a module's namespace into your own
  • local - create a temporary value for a global variable (dynamic scoping)
  • my - declare and assign a local variable (lexical scoping)
  • our - declare and assign a package variable (lexical scoping)
  • package - declare a separate global namespace
  • use - load in a module at compile time

Miscellaneous functions

  • defined - test whether a value, variable, or function is defined
  • dump - create an immediate core dump
  • eval - catch exceptions or compile and run code
  • formline - internal function used for formats
  • local - create a temporary value for a global variable (dynamic scoping)
  • my - declare and assign a local variable (lexical scoping)
  • our - declare and assign a package variable (lexical scoping)
  • prototype - get the prototype (if any) of a subroutine
  • reset - clear all variables of a given name
  • scalar - force a scalar context
  • undef - remove a variable or function definition
  • wantarray - get void vs scalar vs list context of current subroutine call

Functions for processes and process groups

  • alarm - schedule a SIGALRM
  • exec - abandon this program to run another
  • fork - create a new process just like this one
  • getpgrp - get process group
  • getppid - get parent process ID
  • getpriority - get current nice value
  • kill - send a signal to a process or process group
  • pipe - open a pair of connected filehandles
  • qx/STRING/ - backquote quote a string
  • readpipe - execute a system command and collect standard output
  • setpgrp - set the process group of a process
  • setpriority - set a process's nice value
  • sleep - block for some number of seconds
  • system - run a separate program
  • times - return elapsed time for self and child processes
  • wait - wait for any child process to die
  • waitpid - wait for a particular child process to die

Keywords related to perl modules

  • do - turn a BLOCK into a TERM
  • import - patch a module's namespace into your own
  • no - unimport some module symbols or semantics at compile time
  • package - declare a separate global namespace
  • require - load in external functions from a library at runtime
  • use - load in a module at compile time

Keywords related to classes and object-orientedness

  • bless - create an object
  • dbmclose - breaks binding on a tied dbm file
  • dbmopen - create binding on a tied dbm file
  • package - declare a separate global namespace
  • ref - find out the type of thing being referenced
  • tie - bind a variable to an object class
  • tied - get a reference to the object underlying a tied variable
  • untie - break a tie binding to a variable
  • use - load in a module at compile time

Low-level socket functions

  • accept - accept an incoming socket connect
  • bind - binds an address to a socket
  • connect - connect to a remote socket
  • getpeername - find the other end of a socket connection
  • getsockname - retrieve the sockaddr for a given socket
  • getsockopt - get socket options on a given socket
  • listen - register your socket as a server
  • recv - receive a message over a Socket
  • send - send a message over a socket
  • setsockopt - set some socket options
  • shutdown - close down just half of a socket connection
  • socket - create a socket
  • socketpair - create a pair of sockets

System V interprocess communication functions

  • msgctl - SysV IPC message control operations
  • msgget - get SysV IPC message queue
  • msgrcv - receive a SysV IPC message from a message queue
  • msgsnd - send a SysV IPC message to a message queue
  • semctl - SysV semaphore control operations
  • semget - get set of SysV semaphores
  • semop - SysV semaphore operations
  • shmctl - SysV shared memory operations
  • shmget - get SysV shared memory segment identifier
  • shmread - read SysV shared memory
  • shmwrite - write SysV shared memory

Fetching user and group info

Fetching network info

Time-related functions

  • gmtime - convert UNIX time into record or string using Greenwich time
  • localtime - convert UNIX time into record or string using local time
  • time - return number of seconds since 1970
  • times - return elapsed time for self and child processes

Pragmas

  • attributes - get/set subroutine or variable attributes
  • autodie - Replace functions with ones that succeed or die with lexical scope
  • autouse - postpone load of modules until a function is used
  • base - Establish an ISA relationship with base classes at compile time
  • bigint - Transparent BigInteger support for Perl
  • bignum - Transparent BigNumber support for Perl
  • bigrat - Transparent BigNumber/BigRational support for Perl
  • blib - Use MakeMaker's uninstalled version of a package
  • bytes - Perl pragma to force byte semantics rather than character semantics
  • charnames - access to Unicode character names and named character sequences; also define character names
  • constant - Perl pragma to declare constants
  • diagnostics - produce verbose warning diagnostics
  • encoding - allows you to write your script in non-ascii or non-utf8
  • feature - Perl pragma to enable new features
  • fields - compile-time class fields
  • filetest - Perl pragma to control the filetest permission operators
  • if - use a Perl module if a condition holds
  • integer - Perl pragma to use integer arithmetic instead of floating point
  • less - perl pragma to request less of something
  • lib - manipulate @INC at compile time
  • locale - Perl pragma to use or avoid POSIX locales for built-in operations
  • mro - Method Resolution Order
  • open - perl pragma to set default PerlIO layers for input and output
  • ops - Perl pragma to restrict unsafe operations when compiling
  • overload - Package for overloading Perl operations
  • overloading - perl pragma to lexically control overloading
  • parent - Establish an ISA relationship with base classes at compile time
  • re - Perl pragma to alter regular expression behaviour
  • sigtrap - Perl pragma to enable simple signal handling
  • sort - perl pragma to control sort() behaviour
  • strict - Perl pragma to restrict unsafe constructs
  • subs - Perl pragma to predeclare sub names
  • threads - Perl interpreter-based threads
  • threads::shared - Perl extension for sharing data structures between threads
  • utf8 - Perl pragma to enable/disable UTF-8 (or UTF-EBCDIC) in source code
  • vars - Perl pragma to predeclare global variable names (obsolete)
  • vmsish - Perl pragma to control VMS-specific language features
  • warnings - Perl pragma to control optional warnings
  • warnings::register - warnings import function

Utilities

  • perlutil - utilities packaged with the Perl distribution
  • a2p - Awk to Perl translator
  • c2ph - Dump C structures as generated from cc -g -S stabs
  • config_data - Query or change configuration of Perl modules
  • corelist - a commandline frontend to Module::CoreList
  • cpan - easily interact with CPAN from the command line
  • cpanp - The CPANPLUS launcher
  • cpan2dist - The CPANPLUS distribution creator
  • enc2xs - Perl Encode Module Generator
  • find2perl - translate find command lines to Perl code
  • h2ph - convert .h C header files to .ph Perl header files
  • h2xs - convert .h C header files to Perl extensions
  • instmodsh - A shell to examine installed modules
  • libnetcfg - configure libnet
  • perlbug - how to submit bug reports on Perl
  • piconv - iconv(1), reinvented in perl
  • prove - Run tests through a TAP harness.
  • psed - a stream editor
  • podchecker - check the syntax of POD format documentation files
  • perldoc - Look up Perl documentation in Pod format.
  • perlivp - Perl Installation Verification Procedure
  • pod2html - convert .pod files to .html files
  • pod2latex - convert pod documentation to latex format
  • pod2man - Convert POD data to formatted *roff input
  • pod2text - Convert POD data to formatted ASCII text
  • pod2usage - print usage messages from embedded pod docs in files
  • podselect - print selected sections of pod documentation on standard output
  • pstruct - Dump C structures as generated from cc -g -S stabs
  • ptar
  • ptardiff - program that diffs an extracted archive against an unextracted one
  • s2p - a stream editor
  • shasum - Print or Check SHA Checksums
  • splain - produce verbose warning diagnostics
  • xsubpp - compiler to convert Perl XS code into C code
  • perlthanks - how to submit bug reports on Perl

Internals and C language interface

  • perlembed - how to embed perl in your C program
  • perldebguts - Guts of Perl debugging
  • perlxs - XS language reference manual
  • perlxstut - Tutorial for writing XSUBs
  • perlxstypemap - Perl XS C/Perl type mapping
  • perlinterp - An overview of the Perl interpreter
  • perlsource - A guide to the Perl source tree
  • perlclib - Internal replacements for standard C library functions
  • perlguts - Introduction to the Perl API
  • perlcall - Perl calling conventions from C
  • perlapi - autogenerated documentation for the perl public API
  • perlintern - autogenerated documentation of purely internal Perl functions
  • perlmroapi - Perl method resolution plugin interface
  • perliol - C API for Perl's implementation of IO in Layers.
  • perlapio - perl's IO abstraction interface.
  • perlhack - How to hack on Perl
  • perlhacktut - Walk through the creation of a simple C code patch
  • perlhacktips - Tips for Perl core C code hacking
  • perlreguts - Description of the Perl regular expression engine.
  • perlreapi - perl regular expression plugin interface
  • perlpolicy - Various and sundry policies and commitments related to the Perl core

Platform Specific


Source : perldoc.perl.org - Official documentation for the Perl programming language
Site maintained by Jon Allen (JJ)     See the project page for more details
Documentation maintained by the Perl 5 Porters
 Perl Operators (Berikutnya)