相关疑难解决方法(0)

如何判断变量在Perl中是否具有数值?

在Perl中是否有一种简单的方法可以让我确定给定的变量是否为数字?有点像:

if (is_number($x))
{ ... }
Run Code Online (Sandbox Code Playgroud)

会是理想的.当使用-w开关时不会发出警告的技术当然是首选.

perl numbers

80
推荐指数
5
解决办法
13万
查看次数

标签 统计

numbers ×1

perl ×1