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.