in reply to Data::Table and defining $data

You're passing strings ($dates, $quan) instead of arrays (@dates, @quan) to the constructor:

Replace

my $dates = "20070410, 20070415, 20070417, 20070418"; my $quan = "10, 20, 15, 42"; my $table = new Data::Table( [ [$dates], [$quan] ], [ 'Dates', 'Values +' ], 1 );

with

my @dates = (20070410, 20070415, 20070417, 20070418); my @quan = (10, 20, 15, 42); my $table = new Data::Table( [ [@dates], [@quan] ], [ 'Dates', 'Values +' ], 1 );
and it should work (tested).

Replies are listed 'Best First'.
Re^2: Data::Table and defining $data
by GertMT (Hermit) on May 11, 2007 at 12:23 UTC
    geeh, what can I say. Very good I can finally continue!
    Thanks,
    Gert