开发者

How to do chomp a Perl array without using foreach?

开发者 https://www.devze.com 2023-01-12 12:49 出处:网络
How to do chomp the array without using a 开发者_JS百科foreach? @array = ( \" adfasdas \", \"asdas \" , \"23232

How to do chomp the array without using a 开发者_JS百科foreach?

 @array = ( " adfasdas 
", "asdas " , "23232 

",
"ads as" ; 

chomp (@array);


Exactly like that.

chomp @list;

'perldoc -f chomp' for more info.


Exactly how you're doing it.

chomp( @array );

Will chomp every element in the array.

0

精彩评论

暂无评论...
验证码 换一张
取 消