Shlomi Fish wrote:

"Wagner, David --- Sr Programmer Analyst --- CFS"<[email protected]>
wrote:

    Since a \n is at end, then could use split like:
        for my $dtl ( sort {$a<=>  $b} split(/\n/, $a_string) ) {

One can also do split(/^/m, $a_string) to split into lines while preserving the
newlines.

It will also work without the /m option.

split /^/, $a_string



John
--
Any intelligent fool can make things bigger and
more complex... It takes a touch of genius -
and a lot of courage to move in the opposite
direction.                   -- Albert Einstein

--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/


Reply via email to