You can skip the array assignment and just do: foreach ( split "\n", $scalar ) { ... }
I predict a reply that uses map()... though I think that using a map isn't really another solution, but just an alternative to the for loop. map {stuff}, split "\n", $scalar; But I think the answer is basically as you said. Use split. Then again, you ought to be able to open a pipe and print the scalar to the pipe and use the: while <HANDLE> syntax. I'm not sure how exactly the newlines would get treated in that scenario... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/