Hello PDL Wizards,

Always embarrassed to ask easy questions, but I'm stumped. 

Trying to set up and read from a raw binary file (from someone else).
File has a 64-item,unsigned-long header, which must be queried to find
the start and dimensions of the data block. Cribbing directly from the
FlexRaw docs, I did this:

open(AREA,"<$file2");
binmode(AREA)
$head = readflex(AREA, [{NDims=>1, Dims=>[64], Type='ulong'}])
$pixels=$head->(9)
$lines=$head->(8)
$datastart=$head->(33)
seek(AREA,($pixels * $lines)+$datastart,0)
$areadata = readflex(AREA, [{NDims=>2, Dims=>[$pixels,$lines],
Type='byte'}])
close(AREA);

Two questions:

1) I can't get past the first readflex(), because of this error:

Can't modify constant item in scalar assignment at (eval 119) line 4, at
EOF

2) Does PDL actually have a 'ulong' type? (32-bit unsigned)

Thanks,


--Edward H.

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

Reply via email to