Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
从 Perl 中的配置文件中读取时,可能会出现行无效并且不需要将其添加到我的有效行数组中的情况。因为我在这里使用了一个 for 循环,所以即使是无效的行也会创建一个 undef 条目。之后如何删除所有它们?
谢谢!
@array = grep defined, @array;