The first thing I thought of was:
s/(^|\,)(\,|$)/$1-999$2/g;
On Feb 12, 2008, at 7:55 AM, Kåre Edvardsen wrote:
Hi all!
I've got a csv-file looking something like this:
0,1,2,4,5,2,,,4,7
4,2,0,,,,5,7,1,2
1,,3,4,2,8,,2,2,7
and so on. Where there is missing data there is nothing in the file,
not even a space between the commas. When reading with rcols and
$PDL::IO::Misc::colsep = "," rcols substitutes the "non spaces" with
zeroes. How do I avoid that and fill in with -999 instead?
Cheers,
Kare
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl