相关疑难解决方法(0)

Perl 5中存在哪些伪运算符?

我目前正在记录所有Perl 5的运算符(参见perlopref GitHub项目),我也决定包含Perl 5的伪运算符.对我来说,Perl中的伪运算符是任何看起来像运算符的东西,但实际上不仅仅是一个运算符或其他一些语法.我已经记录了我熟悉的四个:

  • ()= 算子的数量
  • =()= goatse/countof运算符
  • ~~ 标量上下文运算符
  • }{ 爱斯基摩吻操作员

这些伪运算符还有哪些其他名称,你知道我错过了哪些伪运算符吗?

=head1 Pseudo-operators

There are idioms in Perl 5 that appear to be operators, but are really a
combination of several operators or pieces of syntax. These pseudo-operators
have the precedence of the constituent parts.

=head2 ()= X

=head3 Description

This pseudo-operator is the list assignment operator (aka the countof
operator).  It is made up of two items C<()>, and C<=>.  In scalar context
it returns the …
Run Code Online (Sandbox Code Playgroud)

perl operators

27
推荐指数
2
解决办法
1482
查看次数

标签 统计

operators ×1

perl ×1