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

Re: Split a string into individual words

by pzbagel (Chaplain)
on Feb 06, 2004 at 01:11 UTC ( [id://326956]=note: print w/replies, xml ) Need Help??


in reply to Split a string into individual words

Basically, qw() is the wrong construct in your second bit of code. qw() assumes that whatever is in the delimiters is text, not a variable. What you want is split.

#replace qw($a); #with my @words=split(/\s+/,$a);

Later

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-23 15:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found