Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Perl 中,我知道我们可以使用与"$x *= $n"相乘。所以我错误地使用了,对于非常小的值,输出似乎是非常高的数字。那个运营商是做什么的?xn"**=""n"
"$x *= $n"
x
n
"**="
"n"
请不要说它只是为了指数。它不是。请使用我显示的语法进行验证
它是幂运算符:
perl -e 'print 2**3';
打印 8
所以,$a **= n等价于$a = $a**nwhich 等价于$a raised to the power n
$a **= n
$a = $a**n
$a raised to the power n