in reply to Data::Table and join

Looks like you need to create a new table with the join; the following seems to work ok for me:
#!/usr/bin/perl use strict; use warnings; use Data::Table; my $t1 = new Data::Table( [ [ 1, 2, 3 ], [ 10, 20, 30 ] ], [ 'A', + 'B' ], 1 ); my $t2 = new Data::Table( [ [ 1, 2, 3 ,4], [ 11, 22, 33,44 ] ], [ 'C', + 'D' ], 1 ); print $t1->csv; print "-------\n"; print $t2->csv; print "-------\n"; my $t3 = $t1->join( $t2, 3, ["A"],["C"] ); print $t3->csv; exit;
Good luck - and thanks for bringing Data::Table in sight, seems a nice module to play with that I didn't know so far.

Replies are listed 'Best First'.
Re^2: Data::Table and join
by GertMT (Hermit) on Oct 18, 2007 at 08:54 UTC
    Indeed a nice module. I use it a lot in combination with GD::Graph, never had the need to join tables but it works! Thanks for your prompt reply.
    Gert
Re^2: Data::Table and join
by Anonymous Monk on Sep 14, 2011 at 20:01 UTC
    Thanks K! Yours was the only information I could find on the data::table join operator anywhere on the internet! This is what I ended up using: $results_by_species_tabref = $results_by_species_tabref -> \ join($sp_domcount_tabref, 3, "HMM", "HMM" ); I was not enough of a perlista to recognize that "ColumnName" would give the references the operator required. The authors did not provide an example of this type this on CPAN.