Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

by kvale (Monsignor)
on Oct 26, 2004 at 15:56 UTC ( [id://402662]=note: print w/replies, xml ) Need Help??


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

Use split to break the sentence into words:
open FILE, "bingo_in.txt"; while (<FILE>) { my @words = split; }
This form of split uses the defaults of splitting $_ and using whitespace as a delimiter.

-Mark

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-03-29 06:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found