Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Reading a Line into an Array

by yakko (Friar)
on May 31, 2001 at 11:02 UTC ( #84480=note: print w/ replies, xml ) Need Help??


in reply to Reading a Line into an Array

Assuming you're splitting on space-like chars, this ought to get you started:

while(<FD>) { chomp; my @array=split(/\s/); # or /\s+/ if you want to collapse whitespa +ce ... }

--
Me spell chucker work grate. Knead grandma chicken.


Comment on Re: Reading a Line into an Array
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2015-08-28 08:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (335 votes), past polls