Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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

by gaal (Parson)
on Oct 26, 2004 at 16:34 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-04-24 10:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found