in reply to Deleting specific array elements
A more idiomatic way to remove newlines is
@molecules = grep { $_ ne "\n" } @molecules; [download]