문제

While reading from a configuration file in Perl there might be cases when a line is invalid and it does not need to get added to my array of valid lines. Since I'm using a for loop here, even the invalid lines create an undef entry. How can I remove all them afterwards?

Thanks!

도움이 되었습니까?

해결책

@array = grep defined, @array;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top