in reply to how to split blocks of text

Why isn't split working for you?

$text=<<"EOT"; Line 1 Line 2 Line 3 EOT foreach ( split(/\n/, $text) ) { print "* $_\n"; }
--
b10m

All code is usually tested, but rarely trusted.

Replies are listed 'Best First'.
Re^2: how to split blocks of text
by ambrus (Abbot) on Nov 08, 2005 at 22:39 UTC

    Or even

    foreach ( split(/^/, $text) ) { print "* $_"; }