Manpages

NAME

perlfaq − Perl 常 问 问 题 集 (2003/01/31 17:37:17)

DESCRIPTION 描 述

perlfaq 按 照 主 题 划 分 为 多 个 文 档 , 在 本 文 档 的 末 尾 有 一 个 目 录 。

Where to get the perlfaq 如 何 取 得 这 份 文 件 ?

这 份 文 件 会 定 期 投 到 comp.lang.perl.misc。 也 可 以 在 许 多 网 站 上 找 到 它 , 例 如 http://www.perldoc.com/ 还 有 http://faq.perl.org/ 译 者 注 : 两 只 老 虎 工 作 室 的 位 置 是 http://2Ti.com/cgi-bin/2T/perl/ 还 有 ftp://www.math.ncu.edu.tw/pub/staff/chenym/FAQ/Perl/ 还 有 <pailing [AT] 2Ti.com>

How to contribute to the perlfaq 如 何 为 perlfaq 做 贡 献 ?

你 可 以 将 更 正 , 扩 充 以 及 建 议 以 邮 件 方 式 发 送 到 perlfaq−workers [AT] perl.org . 这 个 地 址 不 能 用 来 提 问 题 , 它 只 用 来 修 正 当 前 的 FAQ 。 如 果 有 问 题 那 么 投 递 到 新 闻 组 comp.lang.perl.misc。 可 以 在 http://cvs.perl.org/cvsweb/perlfaq/ 查 看 源 码 树 (它 是 在 主 源 码 树 之 外 )。 CVS 仓 库 记 录 了 对 FAQ 的 所 有 改 变 。

What will happen if you mail your Perl programming problems to the authors 如 果 把 编 程 问 题 寄 给 作 者 怎 么 样 ?

作 者 大 概 不 会 理 会 您 所 提 的 问 题 , 除 非 您 是 在 建 议 把 一 些 新 问 题 加 进 FAQ去 , 但 如 果 是 这 样 的 话 这 些 问 题 当 初 就 该 寄 到 perlfaq−workers [AT] perl.com 处 才 对 。

您 应 该 已 经 阅 读 了 这 份 FAQ 的 第 二 部 分 , 您 应 该 知 道 comp.lang.perl.misc 才 是 寻 求 免 费 建 议 的 适 当 地 方 。 如 果 您 的 问 题 真 的 很 重 要 而 且 您 急 着 要 得 到 正 确 解 答 , 那 麽 您 该 请 一 个 顾 问 。

Credits 致 谢

最 初 的 perlfaq 由 Tom Christiansen 完 成 , 接 着 在 Tom 和 Nathan Torkington 的 合 作 下 得 以 扩 展 。 当 前 的 文 档 由 perlfaq-workers (perlfaq−workers [AT] perl.org) 进 行 维 护 , 很 多 人 贡 献 了 解 答 , 更 正 和 评 注 。

Author and Copyright Information

Copyright (c) 1997−2003 Tom Christiansen, Nathan Torkington, and other contributors noted in the answers.

All rights reserved.

Bundled Distributions

This documentation is free; you can redistribute it and/or modify it under the same terms as Perl itself.

Irrespective of its distribution, all code examples in these files are hereby placed into the public domain. You are permitted and encouraged to use this code in your own programs for fun or for profit as you see fit. A simple comment in the code giving credit would be courteous but is not required.

Disclaimer

This information is offered in good faith and in the hope that it may be of use, but is not guaranteed to be correct, up to date, or suitable for any particular purpose whatsoever. The authors accept no liability in respect of this information or its use.

Table of Contents 目 录

perlfaq − 本 文 档
perlfaq1 − 有 关 Perl 的 一 般 问 题
perlfaq2 − 获 取 和 学 习 Perl
perlfaq3 − 编 程 工 具
perlfaq4 − 数 据 操 作
perlfaq5 − 文 件 和 格 式
perlfaq6 − 正 则 表 达 式
perlfaq7 − 综 合 的 问 题
perlfaq8 − 系 统 交 互
perlfaq9 − 网 络

The Questions 问 题

perlfaq1: 有 关 Perl 的 一 般 问 题

有 关 Perl 的 一 般 的 , 非 技 术 层 次 的 问 题

什 么 是 Perl?

谁 对 Perl 提 供 支 持 ? 谁 开 发 了 它 ? 为 什 么 它 是 自 由 的 ?

我 该 用 哪 一 个 版 本 的 Perl?

perl4 和 perl5 各 代 表 什 麽 ?

perl6 是 什 么 ?

Perl的 发 展 已 稳 定 了 吗 ?

Perl难 学 吗 ?

Perl和 其 他 的 程 设 语 言 比 起 来 如 何 ? 例 如 Java, Python, REXX , Scheme,或 Tcl?

我 可 以 用 Perl来 做 【 某 种 差 事 】 吗 ?

哪 些 场 合 下 不 适 合 用 Perl?

「 perl」 和 「 Perl」 有 什 麽 不 同 ?

Perl程 式 应 算 是 program还 是 script?

JAPH 是 什 麽 ?

到 哪 儿 可 拿 到 Larry Wall 的 智 慧 讽 语 (witticisms)?

我 要 如 何 取 信 、 说 服 我 的 系 统 管 理 者 / 上 司 / 属 下 使 用 第 5/5.8.3 版 的 Perl, 而 不 去 用 其 他 的 语 言 ?

perlfaq2: 获 取 和 学 习 Perl

从 哪 里 寻 找 Perl 的 源 程 序 和 文 档 , 支 持 以 及 相 关 事 项

哪 些 平 台 上 有 Perl? 要 到 哪 里 去 找 ?

要 如 何 取 得 以 二 进 制 形 式 发 行 的 Perl?

我 的 系 统 里 没 有 C编 译 器 。 要 如 何 编 译 perl?

我 直 接 将 Perl的 执 行 档 从 一 台 机 器 上 复 制 到 另 一 台 机 器 上 , 但 是 程 式 跑 不 起 来 。

我 抓 回 了 原 始 码 , 试 着 编 译 perl, 但 是 gdbm/dynamic loading/malloc/linking/...部 分 失 败 。 要 如 何 将 它 搞 定 ?

Perl有 哪 些 模 组 和 延 伸 ? CPAN是 什 麽 ? CPAN/src/...又 代 表 什 麽 ?

是 不 是 有 一 个 经 ISO【 国 际 标 准 局 】 或 ANSI【 美 国 国 家 标 准 局 】 认 可 的 Perl版 本 ?

Perl的 相 关 资 料 要 上 哪 儿 找 ?

USENET上 有 哪 些 专 门 讨 论 Perl的 新 闻 讨 论 群 ? 问 题 该 投 到 哪 里 ?

如 果 我 想 投 程 式 原 始 码 , 该 投 到 哪 个 板 子 上 ?

Perl 书 籍

和 Perl 有 关 的 杂 志

网 路 上 的 Perl: 接 触 FTP 和 WWW

有 哪 些 讨 论 Perl 的 邮 件 列 表 ?

comp.lang.perl.misc 的 档 案 库

如 何 购 买 商 业 版 本 的 Perl?

如 果 发 现 bugs要 向 何 处 报 告 ?

什 麽 是 perl.com? Perl Mongers? pm.org? perl.org? cpan.org?

perlfaq3: 编 程 工 具

编 程 工 具 和 编 程 支 持

我 如 何 作 (任 何 事 )?

如 何 以 交 互 的 方 式 使 用 Perl?

有 Perl shell吗 ?

怎 样 查 找 我 的 系 统 中 安 装 了 哪 些 模 块

如 何 替 我 的 Perl 程 式 除 虫 ?

如 何 检 测 (profile) 我 的 perl 程 式 ?

如 何 替 我 的 Perl程 式 作 交 叉 参 考 (cross-reference)?

有 Perl专 用 的 美 化 列 印 程 式 (pretty-printer)吗 ?

有 Perl的 ctags 吗 ?

有 没 有 一 个 IDE 或 图 形 界 面 的 Perl 编 辑 器 ?

哪 儿 有 vi 用 的 Perl 宏 ?

给 emacs用 的 perl模 式 又 要 去 哪 抓 呢 ?

如 何 在 Perl里 使 用 curses?

X或 Tk如 何 与 Perl配 合 呢 ?

如 何 不 靠 CGI或 Tk 帮 助 作 出 简 单 的 目 录 ( 选 单 ) ?

如 何 让 我 的 Perl程 式 跑 得 更 快 些 ?

如 何 让 我 的 Perl 程 序 少 用 一 些 内 存 ?

把 局 部 变 量 的 引 用 返 回 是 不 安 全 的 做 法 吗 ?

我 如 何 释 放 一 个 数 组 或 散 列 以 缩 小 我 的 程 式 尺 寸 ?

如 何 让 我 的 CGI脚 本 (script)执 行 起 来 更 有 效 率 ?

如 何 隐 藏 Perl程 式 的 原 始 码 ?

如 何 把 我 的 Perl程 式 码 编 译 成 byte code或 C?

怎 样 把 Perl 编 译 成 Java?

如 何 才 能 让 "#!perl" 在 [ MS−DOS ,NT,...] 下 起 作 用 ?

我 能 利 用 命 令 行 写 出 有 用 的 程 式 吗 ?

为 何 一 行 的 perl 程 式 无 法 在 我 的 DOS/Mac/VMS系 统 上 运 作 ?

我 得 去 哪 里 学 Perl的 CGI或 是 Web程 式 设 计 呢 ?

从 哪 里 可 以 学 习 面 向 对 象 的 Perl 编 程 ?

从 哪 里 可 以 学 习 将 Perl 与 C 连 接 ? [h2xs, xsubpp]

我 已 经 阅 读 了 perlembed,perlguts 等 等 , 但 是 还 是 不 能 在 我 的 C 程 序 中 嵌 入 perl; 我 作 错 了 什 么 ?

我 试 着 运 行 我 的 脚 本 时 , 看 到 了 这 样 的 消 息 。 它 是 什 么 意 思 ?

什 么 是 MakeMaker?

perlfaq4: 数 据 操 作

操 纵 数 字 , 日 期 , 字 符 串 , 数 组 , 散 列 以 及 各 种 其 他 数 据 类 型 。

Why am I getting long decimals (eg, 19.9499999999999) instead of the numbers I should be getting (eg, 19.95)?

Why isn’t my octal data interpreted correctly?

Does Perl have a round() function? What about ceil() and floor()? Trig functions?

How do I convert between numeric representations?

Why doesn’t & work the way I want it to?

How do I multiply matrices?

How do I perform an operation on a series of integers?

How can I output Roman numerals?

Why aren’t my random numbers random?

How do I get a random number between X and Y?

How do I find the day or week of the year?

How do I find the current century or millennium?

How can I compare two dates and find the difference?

How can I take a string and turn it into epoch seconds?

How can I find the Julian Day?

How do I find yesterday’s date?

Does Perl have a Year 2000 problem? Is Perl Y2K compliant?

How do I validate input?

How do I unescape a string?

How do I remove consecutive pairs of characters?

How do I expand function calls in a string?

How do I find matching/nesting anything?

How do I reverse a string?

How do I expand tabs in a string?

How do I reformat a paragraph?

How can I access or change N characters of a string?

How do I change the Nth occurrence of something?

How can I count the number of occurrences of a substring within a string?

How do I capitalize all the words on one line?

How can I split a [character] delimited string except when inside [character]?

How do I strip blank space from the beginning/end of a string?

How do I pad a string with blanks or pad a number with zeroes?

How do I extract selected columns from a string?

How do I find the soundex value of a string?

How can I expand variables in text strings?

What’s wrong with always quoting "$vars"?

Why don’t my << HERE documents work?

What is the difference between a list and an array?

What is the difference between $array[1] and @array[1]?

How can I remove duplicate elements from a list or array?

How can I tell whether a certain element is contained in a list or array?

How do I compute the difference of two arrays? How do I compute the intersection of two arrays?

How do I test whether two arrays or hashes are equal?

How do I find the first array element for which a condition is true?

How do I handle linked lists?

How do I handle circular lists?

How do I shuffle an array randomly?

How do I process/modify each element of an array?

How do I select a random element from an array?

How do I permute N elements of a list?

How do I sort an array by (anything)?

How do I manipulate arrays of bits?

Why does defined() return true on empty arrays and hashes?

How do I process an entire hash?

What happens if I add or remove keys from a hash while iterating over it?

How do I look up a hash element by value?

How can I know how many entries are in a hash?

How do I sort a hash (optionally by value instead of key)?

How can I always keep my hash sorted?

What’s the difference between "delete" and "undef" with hashes?

Why don’t my tied hashes make the defined/exists distinction?

How do I reset an each() operation part-way through?

How can I get the unique keys from two hashes?

How can I store a multidimensional array in a DBM file?

How can I make my hash remember the order I put elements into it?

Why does passing a subroutine an undefined element in a hash create it?

How can I make the Perl equivalent of a C structure/C ++ class/hash or array of hashes or arrays?

How can I use a reference as a hash key?

How do I handle binary data correctly?

How do I determine whether a scalar is a number/whole/integer/float?

How do I keep persistent data across program calls?

How do I print out or copy a recursive data structure?

How do I define methods for every class/object?

How do I verify a credit card checksum?

How do I pack arrays of doubles or floats for XS code?

perlfaq5: 文 件 和 格 式

I/O and the "f" issues: filehandles, flushing, formats, and footers.

How do I flush/unbuffer an output filehandle? Why must I do this?

How do I change one line in a file/delete a line in a file/insert a line in the middle of a file/append to the beginning of a file?

How do I count the number of lines in a file?

How can I use Perl’s "−i" option from within a program?

How do I make a temporary file name?

How can I manipulate fixed-record-length files?

How can I make a filehandle local to a subroutine? How do I pass filehandles between subroutines? How do I make an array of filehandles?

How can I use a filehandle indirectly?

How can I set up a footer format to be used with write()?

How can I write() into a string?

How can I output my numbers with commas added?

How can I translate tildes (~) in a filename?

How come when I open a file read-write it wipes it out?

Why do I sometimes get an "Argument list too long" when I use <*>?

Is there a leak/bug in glob()?

How can I open a file with a leading ">" or trailing blanks?

How can I reliably rename a file?

How can I lock a file?

Why can’t I just open( FH , ">file.lock")?

I still don’t get locking. I just want to increment the number in the file. How can I do this?

All I want to do is append a small amount of text to the end of a file. Do I still have to use locking?

How do I randomly update a binary file?

How do I get a file’s timestamp in perl?

How do I set a file’s timestamp in perl?

How do I print to more than one file at once?

How can I read in an entire file all at once?

How can I read in a file by paragraphs?

How can I read a single character from a file? From the keyboard?

How can I tell whether there’s a character waiting on a filehandle?

How do I do a "tail −f" in perl?

How do I dup() a filehandle in Perl?

How do I close a file descriptor by number?

Why can’t I use "C:\temp\foo" in DOS paths? What doesn’t ’C:\temp\foo.exe’ work?

Why doesn’t glob("*.*") get all the files?

Why does Perl let me delete read-only files? Why does "−i" clobber protected files? Isn’t this a bug in Perl?

How do I select a random line from a file?

Why do I get weird spaces when I print an array of lines?

perlfaq6: 正 则 表 达 式

模 式 匹 配 和 正 则 表 达 式 。

我 该 如 何 使 用 正 规 表 示 式 才 不 至 於 写 出 不 合 语 法 且 难 以 维 护 的 程 式 码 ?

我 无 法 匹 配 超 过 一 行 的 内 容 , 哪 里 出 了 问 题 ?

我 如 何 取 出 位 於 不 同 行 的 两 个 模 式 间 之 内 容 ?

我 把 一 个 正 规 表 示 式 放 入 $/但 却 没 有 用 。 错 在 哪 里 ?

如 何 在 LHS端 【 译 注 : 式 子 中 运 算 元 左 端 部 份 】 作 不 区 别 大 小 写 式 的 替 换 , 但 在 RHS端 【 右 端 】 保 留 大 小 写 区 别 ?

如 何 使 "\w" 对 应 到 附 重 音 记 号 (accented)的 字 元 ?

如 何 作 一 个 适 合 不 同 locale【 译 注 : 语 言 环 境 , 国 家 地 区 在 文 字 编 码 上 各 自 的 惯 例 】 的 "/[a−zA−Z]/" 对 应 ?

在 一 个 正 规 表 示 式 里 如 何 引 入 (quote) 变 量 ?

"/o" 到 底 是 干 麽 用 的 ?

如 何 使 用 正 规 表 示 式 将 档 案 中 C语 言 样 式 的 注 解 删 掉 ?

我 能 用 Perl的 正 规 表 示 式 去 对 应 成 对 的 符 号 吗 ?

有 人 说 正 规 表 示 式 很 贪 婪 , 那 是 什 麽 意 思 ?该 如 何 避 免 它 所 带 来 的 问 题 ?

如 何 处 理 每 一 行 的 每 个 字 ?

我 如 何 印 出 文 字 出 现 频 率 或 行 出 现 频 率 的 纲 要 ?

如 何 能 作 近 似 对 应 ?

我 如 何 有 效 率 地 一 次 对 应 多 个 正 规 表 示 式 ?

为 何 我 用 "\b" 作 字 界 搜 寻 时 会 失 败 呢 ?

为 什 麽 每 当 我 用 $&, $’,或 $’时 程 式 的 速 度 就 慢 下 来 了 呢 ?

正 规 表 示 式 中 的 "\G" 能 给 我 什 麽 好 处 ?

Perl正 规 表 示 引 擎 是 DFA 或 NFA?它 们 是 POSIX 相 容 的 吗 ?

在 无 返 回 值 上 下 文 中 用 grep或 map有 什 麽 不 对 ?

如 何 对 应 多 位 元 组 字 母 所 构 成 的 字 串 ?

如 何 匹 配 用 户 提 供 的 模 式 ?

perlfaq7: 综 合 的 问 题

综 合 的 Perl 语 言 问 题 , 不 适 于 在 其 他 所 有 段 落 中 讨 论 的 问 题

我 能 拿 到 Perl的 BNF/yacc/RE吗 ?

$@%*这 些 符 号 是 什 麽 意 思 ? 我 怎 麽 知 道 何 时 该 使 用 他 们 呢 ?

字 串 加 引 号 或 使 用 分 号 及 逗 号 是 否 绝 对 必 要 /还 是 完 全 没 必 要 ?

我 如 何 跳 过 一 些 传 回 值 ?

我 如 何 暂 时 滤 掉 警 告 讯 息 ?

什 麽 是 一 个 扩 充 (extension)?

为 何 Perl运 算 子 的 优 先 顺 序 和 C的 不 一 样 ?

我 如 何 声 明 /创 建 一 个 数 据 结 构 ?

如 何 创 建 一 个 模 块 ?

如 何 创 建 一 个 类 ?

如 何 知 道 一 个 变 量 是 否 是 污 染 的 ?

什 么 是 闭 包 ?

什 么 是 变 量 自 杀 , 我 应 该 怎 样 防 止 它 ?

如 何 传 递 /返 回 一 个 {函 数 Function, 文 件 句 柄 FileHandle, 数 组 Array, 散 列 Hash, 方 法 Method, 正 则 表 达 式 Regex}?

如 何 创 建 一 个 静 态 变 量 ?

动 态 和 静 态 作 用 域 有 什 么 区 别 ? local()my() 呢 ?

在 存 在 同 名 内 部 变 量 的 作 用 域 中 , 如 何 存 取 一 个 动 态 变 量 ?

深 连 接 和 浅 连 接 有 什 么 不 同 ?

为 什 么 "my($foo) = < FILE >;" 不 工 作 ?

如 何 重 定 义 一 个 内 建 函 数 , 操 作 符 或 者 方 法 ?

调 用 函 数 时 &foo 和 foo() 的 形 式 有 什 么 不 同 ?

如 何 创 建 一 个 分 支 语 句 ?

如 何 捕 获 对 未 定 义 变 量 , 函 数 或 方 法 的 访 问 ?

为 什 么 找 不 到 包 含 在 同 一 个 文 件 中 的 方 法 ?

如 何 找 到 当 前 的 包 ?

如 何 注 释 掉 大 块 的 perl 代 码 ?

如 何 清 空 一 个 包 ?

如 何 使 用 变 量 值 作 为 一 个 变 量 名 ?

"bad interpreter" 是 什 么 意 思 ?

perlfaq8: 系 统 交 互

进 程 间 通 信 ( IPC ), 用 户 界 面 控 制 (键 盘 , 屏 幕 和 指 点 设 备 )。

如 何 找 出 正 在 运 行 的 操 作 系 统 ?

为 什 么 exec() 不 返 回 ?

如 何 对 键 盘 / 萤 幕 / 滑 鼠 做 些 花 样 ?

如 何 打 印 有 颜 色 的 内 容 ?

如 何 只 读 取 一 个 键 而 不 等 待 按 下 回 车 ?

如 何 检 测 键 盘 上 已 有 输 入 ?

如 何 清 屏 ?

如 何 获 取 屏 幕 大 小 ?

如 何 向 使 用 者 询 问 密 码 ?

如 何 读 写 串 口 ?

如 何 解 码 加 密 的 口 令 文 件 ?

如 何 在 后 台 开 启 进 程 ?

如 何 截 获 控 制 字 符 /信 号 ?

在 Unix 系 统 中 如 何 修 改 shadow 文 件 ?

如 何 设 置 时 间 和 日 期 ?

如 何 sleep()alarm() 少 于 一 秒 的 时 间 ?

如 何 测 度 少 于 一 秒 的 时 间 ?

如 何 做 atexit()或 setjmp()/longjmp()的 动 作 ? ( 异 常 处 理 )

为 何 我 的 sockets程 式 在 System V (Solaris)系 统 下 不 能 用 ? 「 不 支 持 的 协 议 」 这 个 错 误 讯 息 又 是 什 麽 意 思 ?

如 何 从 Perl里 呼 叫 系 统 中 独 特 的 C函 数 ?

在 哪 里 可 以 找 引 入 档 来 做 ioctl()或 syscall()?

为 何 setuid perl程 式 会 抱 怨 关 於 系 统 核 心 的 问 题 ?

如 何 打 开 对 某 程 式 既 输 入 又 输 出 的 管 道 (pipe)?

为 何 用 system()却 得 不 到 一 个 指 令 的 输 出 呢 ?

如 何 补 捉 外 部 指 令 的 STDERR?

为 何 当 管 道 开 启 失 败 时 open()不 会 传 回 错 误 讯 息 ?

在 输 出 值 是 空 的 情 境 里 使 用 反 向 引 号 有 何 不 对 ?

如 何 不 经 过 shell处 理 来 呼 叫 反 向 引 号 ?

为 何 给 了 EOF( Unix上 是 ^D, MS-DOS上 是 ^Z) 後 我 的 程 式 就 不 能 从 STDIN读 取 东 西 了 呢 ?

如 何 把 shell程 式 转 成 perl?

perl能 处 理 telnet或 ftp 会 话 吗 ?

如 何 在 Perl里 达 到 Expect的 功 能 ?

有 没 有 可 能 将 perl的 指 令 列 隐 藏 起 来 , 以 躲 避 像 "ps"之 类 的 程 式 ?

我 在 perl script里 {更 动 目 录 , 更 改 我 的 使 用 环 境 }。 为 何 这 些 改 变 在 程 式 执 行 完 後 就 消 失 了 呢 ? 如 何 让 我 做 的 修 改 显 露 出 来 ?

如 何 关 闭 一 个 程 序 的 文 件 句 柄 而 不 用 等 它 完 成 呢 ?

如 何 fork 一 个 守 护 进 程 ?

如 何 知 道 自 己 是 否 在 交 互 地 运 行 ?

如 何 为 缓 慢 的 事 件 设 置 超 时 ?

如 何 设 置 CPU 限 额 ?

如 何 避 免 在 Unix 系 统 中 产 生 僵 尸 进 程 ?

如 何 使 用 SQL 数 据 库 ?

如 何 使 system() 在 收 到 control−C 时 退 出 ?

如 何 无 阻 塞 地 打 开 一 个 文 件 ?

如 何 从 CPAN 安 装 模 块 ?

require 和 use 的 区 别 是 什 么 ?

如 何 设 置 我 自 己 的 模 块 /库 路 径 ?

如 何 将 我 自 己 的 程 序 的 路 径 加 入 到 模 块 /库 搜 索 路 径 中 ?

如 何 在 运 行 时 将 一 个 目 录 加 入 到 我 的 include 路 径 中 ?

什 么 是 socket.ph, 从 哪 儿 可 以 得 到 它 ?

perlfaq9: 网 络

网 络 通 信 , 互 联 网 以 及 少 量 有 关 web 的 内 容

一 个 CGI 脚 本 的 回 应 的 正 确 格 式 是 什 么 ?

我 的 CGI 脚 本 从 命 令 行 执 行 正 常 , 但 是 在 浏 览 器 中 不 行 (500 Server Error)。

如 何 从 CGI 程 序 中 得 到 好 一 点 的 错 误 提 示 ?

如 何 将 字 符 串 中 的 HTML 删 除 ?

如 何 展 开 URL?

如 何 从 用 户 的 机 器 上 下 载 文 件 ? 如 何 打 开 其 他 机 器 上 的 文 件 ?

如 何 在 HTML 添 加 一 个 弹 出 菜 单 ?

如 何 获 取 HTML 文 件 ?

如 何 根 据 提 交 的 内 容 自 动 生 成 一 个 HTML ?

如 何 解 码 或 创 建 web 中 的 %−encoding?

如 何 重 定 向 到 其 他 页 面 ?

如 何 为 我 的 网 页 加 上 密 码 ?

如 何 用 Perl 修 改 我 的 .htpasswd 和 .htgroup 文 件 ?

如 何 确 保 用 户 不 会 在 表 单 中 输 入 使 我 的 CGI 脚 本 作 坏 事 的 值 ?

如 何 解 释 一 个 邮 件 头 ?

如 何 解 码 一 个 CGI 表 单 ?

如 何 检 测 一 个 有 效 的 邮 件 地 址 ?

如 何 解 码 一 个 MIME/BASE64 字 符 串 ?

如 何 返 回 用 户 的 邮 件 地 址 ?

如 何 发 邮 件 ?

如 何 使 用 MIME 来 为 邮 件 消 息 增 加 附 件 ?

如 何 读 邮 件 ?

如 何 找 到 我 的 主 机 名 /域 名 /IP 地 址 ?

如 何 获 取 一 篇 新 闻 文 章 或 活 动 的 新 闻 组 ?

如 何 获 取 /上 传 一 个 FTP 文 件 ?

如 何 进 行 远 程 过 程 调 用 RPC ?

译 者

萧 百 龄 , 两 只 老 虎 工 作 室 , bbbush