|
如 man 命令一样,在写 perl 程序时可以用perldoc 命令来查看相关的说明文档。 常用功能如下:
perldoc [模块文档],如:perldoc CGI
perldoc Socket
使用 -l 选项查看模块的路径:# perldoc -l Socket
/usr/share/perl/5.10/Socket.pod
使用 -m 选项查看原始模块代码:
使用 -f 选项查看内置参数的使用说明:
perldoc -f sin
perldoc -f open
perldoc -f print
使用 -q 参数查看 FAQ 关键字:perldoc -q Socket
Found in /usr/share/perl/5.10/pod/perlfaq8.pod
Why doesn't my sockets program work under System V (Solaris)? What does
the error message "Protocol not supported" mean?
Some Sys-V based systems, notably Solaris 2.X, redefined some of the
standard socket constants. Since these were constant across all
architectures, they were often hardwired into perl code. The proper
way to deal with this is to "use Socket" to get the correct values.
Note that even though SunOS and Solaris are binary compatible, these
values are different. Go figure.
... |
|