But I suppose the best option here would be just using grep:@some_array = grep { # do something with $_ some_condition($_);} @some_array; 这篇关于perl,在for循环中从数组中删除元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!