http://qs321.pair.com?node_id=303699


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