Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 chilling in the Monastery: (8)
As of 2014-09-23 08:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (211 votes), past polls