For more details, please see ourCookie Policy.

Learn OpenScript

Perl Built-in OpenScript Functions and Keywords

by Derek_Kang on ‎04-03-2012 10:12 AM (1,706 Views)

Perl Built-in Functions Supproted

Functions for SCALARs or strings

chomp, chop, chr, crypt, hex, index, lc, lcfirst, length, oct, ord, pack, q//, qq//, reverse, rindex, sprintf, substr, tr///, uc, ucfirst, y///

Regular expressions and pattern matching
m//, pos, quotemeta, s///, split, study, qr//

Numeric functions
abs, atan2, cos, exp, hex, int, log, oct, rand, sin, sqrt, srand

Functions for real @ARRAYs
each, keys, pop, push, shift, splice, unshift, values

Functions for list data
grep, join, map, qw//, reverse, sort, unpack

Functions for real %HASHes
delete, each, exists, keys, values

Functions for fixed-length data or records
pack, unpack

Keywords related to the control flow of your Perl program
caller, continue, die, do, dump, eval, exit, goto, last, next, redo, return, sub, wantarray

Keywords related to scoping
caller, import, local, my, our, package, state, use
state is available only if the "state" feature is enabled. See feature. Alternately, include a use v5.10 or later to the current scope.

Miscellaneous functions
defined, dump, eval, formline, local, my, our, reset, scalar, state, undef, wantarray

Keywords related to Perl modules
do, import, no, package, require, use

Keywords related to classes and object-orientation
bless, package, ref, tie, tied, untie, use

Perl Built-in Functions Not Supproted

Input and output functions

binmode, close, closedir, dbmclose, dbmopen, eof, fileno, flock, format, getc, read, readdir, rewinddir, say, seek, seekdir, select, syscall, sysread, sysseek, syswrite, tell, telldir, truncate, write

Functions for fixed-length data or records

read, syscall, sysread, syswrite, vec

Keywords related to the switch feature

break , continue, default, given , when

Functions for filehandles, files, or directories

-X, chdir, chmod, chown, chroot, fcntl, glob, ioctl, link, lstat, mkdir, open, opendir, readlink, rename, rmdir, stat, symlink, sysopen, umask, unlink, utime

Functions for processes and process groups

alarm, exec, fork, getpgrp, getppid, getpriority, kill, pipe, qx//, setpgrp, setpriority, sleep, system, times, wait, waitpid

Low-level socket functions

accept, bind, connect, getpeername, getsockname, getsockopt, listen, recv, send, setsockopt, shutdown, socket, socketpair

System V interprocess communication functions

msgctl, msgget, msgrcv, msgsnd, semctl, semget, semop, shmctl, shmget, shmread, shmwrite

Fetching user and group info

endgrent, endhostent, endnetent, endpwent, getgrent, getgrgid, getgrnam, getlogin, getpwent, getpwnam, getpwuid, setgrent, setpwent

Fetching network info

endprotoent, endservent, gethostbyaddr, gethostbyname, gethostent, getnetbyaddr, getnetbyname, getnetent, getprotobyname, getprotobynumber, getprotoent, getservbyname, getservbyport, getservent, sethostent, setnetent, setprotoent, setservent

Time-related functions

gmtime, localtime, time, times

Functions obsoleted in perl5

dbmclose, dbmopen