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

Re: whats the best way to query/extract fields from a tab delimited file

by reclaw (Curate)
on Oct 31, 2003 at 20:25 UTC ( #303699=note: print w/ replies, xml ) Need Help??


in reply to whats the best way to query/extract fields from a tab delimited file

You could also try using AnyData

use AnyData; my $table = adTie('Tab', 'file.tsv', 'r'); # Get all column Names my @col_names = adNames($table); # or get all values in a column my @col_vals = adColumn($table, 'column_name'); # or get a column value from a row print $table->{row_name}->{column_name}; # or search all rows for a value while (my $row = each %$table) { print $row->{column_name} if $row->{row_name} eq 'this'; } undef $table;

Reclaw

Your mileage may very.


Comment on Re: whats the best way to query/extract fields from a tab delimited file
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2015-07-29 22:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls