Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: How do I retrieve specific column values from a table of records?

by le (Friar)
on Jun 08, 2000 at 01:30 UTC ( [id://16966]=note: print w/replies, xml ) Need Help??


in reply to How do I retrieve specific column values from a table of records?

It'd be easy if your file had a unique data seperator, like ";" or maybe "|". Then you could split() the rows on that seperator.
open (FILE, "data.txt") or die $!; while(<FILE>) { @array = split(/;/); print $array[1], $array[2]; } close(FILE);
Looks like the original data was tab-separated. split("\t") would work there. -- Ed.
  • Comment on Re: How do I retrieve specific column values from a table of records?
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-24 13:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found