Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: problem with array

by AgentM (Curate)
on Mar 14, 2001 at 04:24 UTC ( [id://64284]=note: print w/replies, xml ) Need Help??


in reply to problem with array

You're obviously a beginner that needs to read some more documentation. This site has somewhat current documentation starting at perlman and Tutorials. The reason you are only getting the last line is because you assign the split line to the array which overwrites any previous value. Instead, use push as in
push(@data,$_);
That way, you store all of the values along the way. Perhaps you could split later, too, otherwise you would need to learn nested/referenced data structures.
AgentM Systems nor Nasca Enterprises nor Bone::Easy nor Macperl is responsible for the comments made by AgentM. Remember, you can build any logical system with NOR.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2024-04-20 00:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found