指南:
>尝试限制对Perl核心的答案,而不是CPAN
>请给出一个例子和一个简短的描述
(这些都是从Corion’s answer)
> C
> Duff的设备
>便携性和标准性
> C#
>引号用于空格分隔的列表和字符串
>可别名命名空间
> Java
>静电助剂
>职能是头等公民
>块范围和关闭
>通过变量间接调用方法和访问器
> Ruby
> PHP
>全面的在线文档
>魔法方法
>符号引用
> Python
其他隐藏功能:
运算符:
> The bool quasi-operator
> The flip-flop operator
> The ++
and unary -
operators work on strings
> The repetition operator
> The spaceship operator
> The || operator (and // operator) to select from a set of choices
> The diamond operator
> @L_301_16@
> The tilde-tilde “operator”
报价结构:
> The qw operator
> Letters can be used as quote delimiters in q{}-like constructs
> Quoting mechanisms
语法和名称:
> There can be a space after a sigil
> You can give subs numeric names with symbolic references
> Legal trailing commas
> Grouped Integer Literals
> hash slices
> Populating keys of a hash from an array
模块,编译指示和命令行选项:
> use strict and use warnings
> Taint checking
> Esoteric use of -n and -p
> CPAN
> overload::constant
> IO::Handle module
> Safe compartments
> Attributes
变量:
> Autovivification
> The $[
variable
> tie
> Dynamic Scoping
> Variable swapping with a single statement
循环和流量控制:
> Magic goto
> for
on a single variable
> continue clause
> Desperation mode
正则表达式:
> The \G
anchor
> (?{})
and ‘(??{})` in regexes
其他特性:
> The debugger
> Special code blocks such as BEGIN,CHECK,and END
> The DATA
block
> New Block Operations
> Source Filters
> Signal Hooks
> map(twice)
> Wrapping built-in functions
> The eof
function
> The dbmopen
function
> Turning warnings into errors
其他技巧和元答案:
> cat files,decompressing gzips if needed
> Perl Tips
也可以看看:
> Hidden features of C
> Hidden features of C#
> Hidden features of C++
> Hidden features of Java
> Hidden features of JavaScript
> Hidden features of Ruby
> Hidden features of PHP
> Hidden features of Python
> Hidden features of Clojure