相关疑难解决方法(0)

如何在Perl中重复一次字符串N次?

在Python中,如果我这样做:

print "4" * 4
Run Code Online (Sandbox Code Playgroud)

我明白了

> "4444"
Run Code Online (Sandbox Code Playgroud)

在Perl中,我会得到

> 16
Run Code Online (Sandbox Code Playgroud)

在Perl中有一个简单的方法来做前者吗?

string perl operators repeat

56
推荐指数
4
解决办法
6万
查看次数

标签 统计

operators ×1

perl ×1

repeat ×1

string ×1