I'm trying to read in a CSV file that contains non-numeric data.  A
normal PDL can't hold strings, so I figure I must use PDL::Char.  I
don't believe this can be used with rcols, but that would be the ideal
situation.

As it is, the solution I've come up with is:
                                while (<$filename>) {
                                                                
@temp=split(",",$_);
                                                                
$t_pdl=PDL::Char->new(@temp);
                                                                push 
(@file_pl_arr,$t_pdl);
                                }
                                $file_array=pdl(@file_pl_arr);

However, using PDL::Char doesn't store strings, it stores each char in
a different part of the grid... which kills the nice two-dimensional
nature of a csv file.  So I'm using the above code with
$t_pdl=pdl(@temp) and referencing strings from the "2d" perl array I'm
pushing @temp onto.

Besides the ugliness of using a PDL and an "array" of "arrays", using
perl's slurp function would probably be faster - any suggestions on
how to slurp into a PDL?  I find myself wanting to thread over a perl
array =/

On an entirely separate note... is there a pgplot command to draw an
unfilled circle?

Adam

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to