If your data really looks like this...
["2007/12/18", "34.6400", "35.0000", "34.2100", "34.7400"], ["2007/12/19", "34.6900", "35.1400", "34.3800", "34.7900"], ["2007/12/20", "35.2900", "35.7900", "35.0800", "35.5200"],
...and i understood you right i would try something like this:
#!/usr/bin/env perl use strict; use warnings; use Data::Dump; use Path::Tiny; my $data = path("data.txt")->slurp; # $data = qq(\($data\)); $data = qq{($data)}; my @data = eval($data); dd \@data; __END__ karls-mac-mini:monks karl$ ./slowandsteady.pl [ ["2007/12/18", "34.6400", "35.0000", "34.2100", "34.7400"], ["2007/12/19", "34.6900", "35.1400", "34.3800", "34.7900"], ["2007/12/20", "35.2900", "35.7900", "35.0800", "35.5200"], ]
See also perldsc, eval and Path::Tiny for further information.
Edit: Removed frivolous escapades.
Best regards, Karl
«The Crux of the Biscuit is the Apostrophe»
In reply to Re: candlestick from csv
by karlgoethebier
in thread candlestick from csv
by slowandsteady
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |