You can use the PERLCOLS option. 

perldl> ($a,$b,$c,$d,$e,$f,$g,$name) = rcols "filename", 0,2,3,4,5,6,7,
{ PERLCOLS => [1], TYPES => [ ushort, ushort, ushort, double, ushort,
ushort, double ]}

Reading data into piddles of type: [ Ushort Ushort Ushort Double Ushort
Ushort Double ]
Read in  6  elements.

perldl> p @$name
Halden Moss Sarpsborg Fredrikstad Hvaler Aremark

perldl> p $g
[58.34 3.62 10.94 0.6 20.77 44.03]


The names will end up in a referenced perl array, the rest will be in
pdls.

Cheers,
Trevor.

On Mon, 30 Oct 2006
Kåre Edvardsen <[EMAIL PROTECTED]> wrote:

> Hi all,
> 
> What's the story on reading (rcols) files containing text in addition
> to numbers? I've got a file with this structure, and I would also
> like to keep the names in the second column of the dataset.
> 
> 101        Halden              59          7       35.8         11
> 28      58.34
> 104        Moss                59         27      33.57         10
> 42       3.62
> 105        Sarpsborg           59         17      26.98         11
> 12      10.94
> 106        Fredrikstad         59         12      19.09         10
> 57        0.6
> 111        Hvaler              59          3      23.08         11
> 1      20.77
> 118        Aremark             59         13      23.92         11
> 41      44.03
> 
> 
> Best regards,
> Kare

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

Reply via email to