in reply to splitting on new-line characters

Could you be a bit more specific than "it doesn't work"? What is the content of $array? What is in @array after you did the split? What do you expect @array to contain?

See, the line of code you gave means: split the content of $array on newlines, and put the resulting parts in @array.

Abigail