我正在做一个包含短语的每个单词的数组。当我尝试拆分它并打印长度时,控制台会给我一个巨大的数字,例如111039391231319239188238139123919232913123...
(更多行)为什么?
这是我的代码:
$mynames = $texto3;
print $mynames. "\n";
@nameList = split(' ', $texto3);
#print @nameList.length();
for ($to = 0; $to<@nameList.length; $to++){
if($to<@nameList.length) {
@nameList[$to] = @nameList[$to] . "_" . @nameList[$to++];
}
print $to;
#print @nameList[$to] . "\n";
}
$string_level2 = join(' ', @nameList);
#print $string_level2;