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.
精彩评论