in reply to Can Perl Turn A String Into A Virtual File?

figure out what your "virtual newlines" would be,and split on them, so you can go back to
while (@lines) {...}
not very magical, but hey.