in reply to Re^2: Hashes of Hashes of Arrays? Is it possible?
in thread Hashes of Hashes of Arrays? Is it possible?
my $csv = Text::CSV_XS->new(); open (FILE, "<", "$tickdir/$file") or die "Can't open CSV File:$! +\n"; my %HOH; while (<FILE>) { $csv->parse($_); my @columns = $csv->fields(); my $key = str2time($columns[1].' '.$columns[2]); my (@prices, @volumes) = (); $HOH{$key}{"name"} = $columns[0]; push(@{$HOH{$key}{"price"}}, $columns[3]); push(@{$HOH{$key}{"volumes"}}, $columns[4]); print Dumper(\%HOH); } close FILE;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Hashes of Hashes of Arrays? Is it possible?
by capriguy84 (Novice) on Sep 08, 2011 at 19:31 UTC | |
by Marshall (Canon) on Sep 08, 2011 at 23:17 UTC | |
by Jim (Curate) on Sep 08, 2011 at 20:21 UTC | |
|
Re^6: Hashes of Hashes of Arrays? Is it possible?
by capriguy84 (Novice) on Sep 08, 2011 at 22:51 UTC | |
by Jim (Curate) on Sep 09, 2011 at 02:55 UTC |