関数一覧

Perlの組み込み関数は全部で200個程度しかない。

それ以外のことをしたい場合にはCPAN(Comprehensive Perl Archive Network)などからライブラリをダウンロードしたりします。

関数名カテゴリ説明
-XFilea file test (-r, -x, etc)
absMathabsolute value function
acceptSocketaccept an incoming socket connect
alarmProcessschedule a SIGALRM
atan2Matharctangent of Y/X in the range -PI to PI
bindSocketbinds an address to a socket
binmodeI/Oprepare binary files for I/O
blessObjectscreate an object
callerFlow,Namespaceget context of the current subroutine call
chdirFilechange your current working directory
chmodFilechanges the permissions on a list of files
chompString remove a trailing record separator from a string
chopString remove the last character from a string
chownFilechange the owership on a list of files
chrString get character this number represents
chrootFilemake directory new root for path lookups
closeI/Oclose file (or pipe or socket) handle
closedirI/Oclose directory handle
connectSocketconnect to a remote socket
continueFlowoptional trailing block in a while or foreach
cosMathcosine function
cryptStringone-way passwd-style encryption
dbmcloseObjects,I/Obreaks binding on a tied dbm file
dbmopenObjects,I/Ocreate binding on a tied dbm file
definedMisctest whether a value, variable, or function is defined
deleteHASHdeletes a value from a hash
dieI/O,Flowraise an exception or bail out
doFlow,Modulesturn a BLOCK into a TERM
dumpMisc,Flowcreate an immediate core dump
eachHASHretrieve the next key/value pair from a hash
endgrentUserbe done using group file
endhostentUserbe done using hosts file
endnetentUserbe done using networks file
endprotoentNetworkbe done using protocols file
endpwentUserbe done using passwd file
endserventNetworkbe done using services file
eofI/Otest a filehandle for its end
evalFlow,Misccatch exceptions or compile and run code
execProcessabandon this program to run another
existsHASHtest whether a hash key is present
exitFlowterminate this program
expMathraise I<e> to a power
fcntlFilefile control system call
filenoI/Oreturn file descriptor from filehandle
flockI/Olock an entire file with an advisory lock
forkProcesscreate a new process just like this one
formatI/Odeclare a picture format with use by the write() function
formlineMiscinternal function used for formats
getcI/Oget the next character from the filehandle
getgrentUserget next group record
getgrgidUserget group record given group user ID
getgrnamUserget group record given group name
gethostbyaddrNetworkget host record given its address
gethostbynameNetworkget host record given name
gethostentNetworkget next hosts record
getloginUserreturn who logged in at this tty
getnetbyaddrNetworkget network record given its address
getnetbynameNetworkget networks record given name
getnetentNetworkget next networks record
getpeernameSocketfind the other end of a socket connection
getpgrpProcessget process group
getppidProcessget parent process ID
getpriorityProcessget current nice value
getprotobynameNetworkget protocol record given name
getprotobynumberNetworkget protocol record numeric protocol
getprotoentNetworkget next protocols record
getpwentUserget next passwd record
getpwnamUserget passwd record given user login name
getpwuidUserget passwd record given user ID
getservbynameNetworkget services record given its name
getservbyportNetworkget services record given numeric port
getserventNetworkget next services record
getsocknameSocketretrieve the sockaddr for a given socket
getsockoptSocketget socket options on a given socket
globFileexpand filenames using wildcards
gmtimeTimeconvert UNIX time into record or string using Greenwich time
gotoFlowcreate spaghetti code
grepLISTlocate elements in a list test true against a given criterion
hexMath,Stringconvert a string to a hexadecimal number
importModules,Namespacepatch a module's namespace into your own
indexStringfind a substring within a string
intMathget the integer portion of a number
ioctlFilesystem-dependent device control system call
joinLISTjoin a list into a string using a separator
keysHASHretrieve list of indices from a hash
killProcesssend a signal to a process or process group
lastFlowexit a block prematurely
lcStringreturn lower-case version of a string
lcfirstStringreturn a string with just the next letter in lower case
lengthStringreturn the number of bytes in a string
linkFilecreate a hard link in the filesytem
listenSocketregister your socket as a server
localMisc,Namespacecreate a temporary value for a global variable (dynamic scoping)
localtimeTimeconvert UNIX time into record or string using local time
lockThreadsget a thread lock on a variable, subroutine, or method
logMathretrieve the natural logarithm for a number
lstatFilestat a symbolic link
m//Regexpmatch a string with a regular expression pattern
mapLISTapply a change to a list to get back a new list with the changes
mkdirFilecreate a directory
msgctlSysVSysV IPC message control operations
msggetSysVget SysV IPC message queue
msgrcvSysVreceive a SysV IPC message from a message queue
msgsndSysVsend a SysV IPC message to a message queue
myMisc,Namespacedeclare and assign a local variable (lexical scoping)
nextFlowiterate a block prematurely
noModulesunimport some module symbols or semantics at compile time
packageModules,Objects,Namespacedeclare a separate global namespace
prototypeFlow,Miscget the prototype (if any) of a subroutine
octString,Mathconvert a string to an octal number
openFileopen a file, pipe, or descriptor
opendirFileopen a directory
ordStringfind a character's numeric representation
ourMisc,Namespacedeclare and assign a package variable (lexical scoping)
packBinary,Stringconvert a list into a binary representation
pipeProcessopen a pair of connected filehandles
popARRAYremove the last element from an array and return it
posRegexpfind or set the offset for the last/next m//g search
printI/Ooutput a list to a filehandle
printfI/O output a formatted list to a filehandle
pushARRAYappend one or more elements to an array
q/STRING/Stringsingly quote a string
qq/STRING/Stringdoubly quote a string
quotemetaRegexpquote regular expression magic characters
qw/STRING/LISTquote a list of words
qx/STRING/Processbackquote quote a string
qr/STRING/RegexpCompile pattern
randMathretrieve the next pseudorandom number
readI/O,Binaryfixed-length buffered input from a filehandle
readdirI/Oget a directory from a directory handle
readlineI/Ofetch a record from a file
readlinkFiledetermine where a symbolic link is pointing
readpipeProcessexecute a system command and collect standard output
recvSocketreceive a message over a Socket
redoFlowstart this loop iteration over again
refObjectsfind out the type of thing being referenced
renameFilechange a filename
requireModulesload in external functions from a library at runtime
resetMiscclear all variables of a given name
returnFlowget out of a function early
reverseString,LISTflip a string or a list
rewinddirI/Oreset directory handle
rindexStringright-to-left substring search
rmdirFileremove a directory
s///Regexpreplace a pattern with a string
scalarMiscforce a scalar context
seekI/Oreposition file pointer for random-access I/O
seekdirI/Oreposition directory pointer
selectI/Oreset default output or do I/O multiplexing
semctlSysVSysV semaphore control operations
semgetSysVget set of SysV semaphores
semopSysVSysV semaphore operations
sendSocketsend a message over a socket
setgrentUserprepare group file for use
sethostentNetworkprepare hosts file for use
setnetentNetworkprepare networks file for use
setpgrpProcessset the process group of a process
setpriorityProcessset a process's nice value
setprotoentNetworkprepare protocols file for use
setpwentUserprepare passwd file for use
setserventNetworkprepare services file for use
setsockoptSocketset some socket options
shiftARRAYremove the first element of an array, and return it
shmctlSysVSysV shared memory operations
shmgetSysVget SysV shared memory segment identifier
shmreadSysVread SysV shared memory
shmwriteSysVwrite SysV shared memory
shutdownSocketclose down just half of a socket connection
sinMathreturn the sine of a number
sleepProcessblock for some number of seconds
socketSocketcreate a socket
socketpairSocketcreate a pair of sockets
sortLISTsort a list of values
spliceARRAYadd or remove elements anywhere in an array
splitRegexpsplit up a string using a regexp delimiter
sprintfStringformatted print into a string
sqrtMathsquare root function
srandMathseed the random number generator
statFileget a file's status information
studyRegexpoptimize input data for repeated searches
subFlowdeclare a subroutine, possibly anonymously
substrStringget or alter a portion of a stirng
symlinkFilecreate a symbolic link to a file
syscallI/O,Binaryexecute an arbitrary system call
sysopenFileopen a file, pipe, or descriptor
sysreadI/O,Binaryfixed-length unbuffered input from a filehandle
sysseekI/O,Binaryposition I/O pointer on handle used with sysread and syswrite
systemProcessrun a separate program
syswriteI/O,Binaryfixed-length unbuffered output to a filehandle
tellI/Oget current seekpointer on a filehandle
telldirI/Oget current seekpointer on a directory handle
tieObjectsbind a variable to an object class
tiedObjectsget a reference to the object underlying a tied variable
timeTimereturn number of seconds since 1970
timesProcess,Timereturn elapsed time for self and child processes
tr///Stringtransliterate a string
truncateI/Oshorten a file
ucStringreturn upper-case version of a string
ucfirstStringreturn a string with just the next letter in upper case
umaskFileset file creation mode mask
undefMiscremove a variable or function definition
unlinkFileremove one link to a file
unpackBinary,LISTconvert binary structure into normal perl variables
unshiftARRAYprepend more elements to the beginning of a list
untieObjectsbreak a tie binding to a variable
useModules,Namespaceload a module and import its namespace
use Objectsload in a module at compile time
utimeFileset a file's last access and modify times
valuesHASHreturn a list of the values in a hash
vecBinarytest or set particular bits in a string
waitProcesswait for any child process to die
waitpidProcesswait for a particular child process to die
wantarrayMisc,Flowget void vs scalar vs list context of current subroutine call
warnI/Oprint debugging info
writeI/Oprint a picture record
y///Stringtransliterate a string

スポンサーリンク

オープンソースライセンスの一覧と日本語訳(全52種類)

ホームページ製作・web系アプリ系の製作案件募集中です。

上に戻る