Perl參考函數
Perl參考函數,函數學習例子,函數實例代碼,函數教學等
這是標準的Perl解釋器所支持的所有重要函數/功能的列表。在一個函數中找到它的詳細信息。
-
abs - 絕對值函數
-
accept - 接受傳入的socket連接
-
alarm - 調度一個SIGALRM
-
atan2 -Y/X的反正切值,範圍在-PI到PI
-
bind - 地址綁定到一個套接字
-
binmode - 準備二進製文件I / O
-
bless - 創建一個對象
-
caller - 獲取當前子程序調用的上下文
-
chdir - 改變當前的工作目錄
-
chmod - 改變權限的文件列表
-
chomp - 從字符串中刪除結尾的記錄分隔符
-
chop - 刪除一個字符串的最後一個字符
-
chown - 改變文件列表的所有權
-
chr - 這個數字代表獲得字符
-
chroot - 根目錄下新建一個路徑查找
-
close - 關閉文件(或管道或套接字)處理
-
closedir - 關閉目錄句柄
-
connect - 連接到遠程套接字
-
continue - 可選的結尾塊在一段時間內或foreach
-
cos - 餘弦函數
-
crypt - 單向密碼式加密
-
dbmclose - 中斷約束的一道排在並列dbm文件
-
dbmopen - 創建綁定一道排在並列dbm文件
-
defined - 測試是否為一個值,變量或函數定義或
-
delete - 刪除從哈希一個值
-
die - 拋出一個異常,或擺脫困境(錯誤)
-
do - 打開塊轉到一個TERM
-
dump - 立即創建一個核心轉儲
-
each - 檢索下一個鍵/值對從哈希
-
endgrent - 使用組文件
-
endhostent - 使用hosts文件
-
endnetent - 使用網絡文件
-
endprotoent - 使用協議文件
-
endpwent - 使用passwd文件
-
endservent - 使用服務文件
-
eof - 測試是否為一個文件結束句柄
-
eval - 捕獲異常或編譯和運行代碼
-
exec - 放棄此程序運行另一個
-
exists - 測試是否存在的哈希鍵
-
exit - 終止這個程序
-
exp - 提高I的冪
-
fcntl - 文件控製係統調用
-
fileno - 從文件句柄,返回的文件描述符
-
flock - 與谘詢鎖鎖定整個文件
-
fork - 創建一個新的進程,就像這個
-
format - 使用write()函數聲明的圖片格式
-
formline - 內部功能的使用格式
-
getc - 得到的下一個字符的文件句柄
-
getgrent - 下一組記錄
-
getgrgid - 組記錄組用戶ID
-
getgrnam - 組記錄組的名稱
-
gethostbyaddr - 主機記錄其地址
-
gethostbyname - 主機記錄給定的名稱
-
gethostent - 獲取下一個主機記錄
-
getlogin -返回誰在這個tty登錄
-
getnetbyaddr - 網絡記錄其地址
-
getnetbyname - 網絡記錄給定的名稱
-
getnetent - 獲得下一個的網絡記錄
-
getpeername - 找到套接字連接的另一端
-
getpgrp - 獲取進程組
-
getppid - 父進程ID
-
getpriority - 目前的優先值
-
getprotobyname - 協議記錄給定的名稱
-
getprotobynumber - 協議記錄數字化協議
-
getprotoent - 獲取下一個協議記錄
-
getpwent - passwd文件下一個記錄
-
getpwnam - 獲得passwd文件記錄用戶的登錄名
-
getpwuid - 獲取passwd文件記錄用戶ID
-
getservbyname - 服務記錄給它的名字
-
getservbyport - 服務記錄給定的數字端口
-
getservent - 得到下一個服務記錄
-
getsockname - 對於給定的套接字檢索的sockaddr
-
getsockopt - 獲得在一個給定的socket套接字選項
-
glob - 擴大使用通配符的文件名
-
gmtime - UNIX時間轉換成記錄或使用格林威治時間格式的字符串。
-
goto - 創建goto代碼
-
grep - 定位元素列表中的測試是對一個給定的標準
-
hex - 將字符串轉換為一個十六進製數
-
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
-
join - join a list into a string using a separator
-
keys - retrieve list of indices from a hash
-
kill - send a signal to a process or process group
-
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
-
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
-
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)
-
next - iterate a block prematurely
-
no - unimport some module symbols or semantics at compile time
-
oct - convert a string to an octal number
-
open - open a file, pipe, or descriptor
-
opendir - open a directory
-
ord - find a character's numeric representation
-
our - declare and assign a package variable (lexical scoping)
-
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 - 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
-
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 - replace a pattern with a string
-
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
-
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
-
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
-
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
-
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
-
use - load in a module at compile time
-
utime - set a file's last access and modify times
-
values - return a list of the values in a hash
-
vec - test or set particular bits in a string
-
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
-
write - print a picture record
-
-X - a file test (-r, -x, etc)
-
y - transliterate a string<