曲径通幽论坛

 找回密码
 立即注册
搜索
查看: 5113|回复: 0
打印 上一主题 下一主题

使用 perldoc 命令查看 perl 文档

[复制链接]

4918

主题

5880

帖子

3万

积分

GROAD

曲径通幽,安觅芳踪。

Rank: 6Rank: 6

积分
34397
跳转到指定楼层
楼主
发表于 2011-9-20 17:32:36 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
如 man 命令一样,在写 perl 程序时可以用perldoc 命令来查看相关的说明文档。 常用功能如下:

perldoc [模块文档],如:
perldoc CGI
perldoc Socket

使用 -l 选项查看模块的路径:
# perldoc -l Socket
/usr/share/perl/5.10/Socket.pod

使用 -m 选项查看原始模块代码:
perldoc -m Socket

使用 -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.
...
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|曲径通幽 ( 琼ICP备11001422号-1|公安备案:46900502000207 )

GMT+8, 2025-7-4 02:26 , Processed in 0.077814 second(s), 23 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表