in reply to
Deleting specific array elements
If you never need these newline elements, i would avoid storing them in the first place.
@molecules = grep { $_ ne "\n" } split ...
[download]
Comment on
Re: Deleting specific array elements
Download
Code
In Section
Seekers of Perl Wisdom