Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: how to split blocks of text

by b10m (Vicar)
on Nov 08, 2005 at 11:19 UTC ( #506701=note: print w/replies, xml ) Need Help??


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 "* $_"; }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://506701]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2022-12-07 16:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?