Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: How do you place words from a sentence into an array?

by gaal (Parson)
on Oct 26, 2004 at 16:34 UTC ( #402692=note: print w/replies, xml ) Need Help??

in reply to How do you place words from a sentence into an array?

Everybody said split, but note that if you have some punctuiation, you may be disappointed; for this sentence, for example, $words[2] is "split,".

You must have heard of CPAN: it has lots of modules. Lingua::EN::Splitter is one that (if you're looking for a real-world solution) can help you here. Of course, split *is* useful to know! But when it comes to human language, problems are often more complex than you think.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2022-05-29 09:37 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (101 votes). Check out past polls.