in reply to Re^7: bit by overhead
in thread bit by overhead
Shouldn't that be:sub from_cache2 { my $ticker = shift; return [ map unpack("A10FFFFL", $_), $cache2{$ticker} ]; }
The other way doesn't seem to work, since map wants an array, not an array reference, and since the data is stored in a multidimensional array, shouldn't each row be pushed as a reference?sub from_cache { my $ticker = shift; my $ref = $data_cache{$ticker}; return [ map [unpack("A10FFFFL", $_)], @$ref ]; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: bit by overhead
by BrowserUk (Patriarch) on Jan 07, 2011 at 16:40 UTC | |
by Anonymous Monk on Jan 07, 2011 at 17:39 UTC | |
by BrowserUk (Patriarch) on Jan 07, 2011 at 18:14 UTC |