Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: how to split blocks of text

by b10m (Vicar)
on Nov 08, 2005 at 11:19 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-24 08:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found