in reply to Re: Split and empty strings
in thread Split and empty strings

No, they're scattered randomly through the string. But thanks for the idea, TheoPetersen. I've looked at perlfunc:split again - still no joy.

Slight modification - I've realised I don't need the /m on the regexp. Works the same without.

andy.

update: thanks again. I've realised that I was being stupid - the onset of tunnel vision. split was doing exaclty what it ought, as your example shows, but the regexp was returning extra blank lines.