Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Syntactic Confectionery Delight
 
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 rifling through the Monastery: (6)
As of 2014-04-19 13:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (481 votes), past polls