peterchan75
Supremacy Member
- Joined
- Apr 26, 2003
- Messages
- 6,721
- Reaction score
- 529
Hi all,
I am trying to extract data from csv files.
1. Read each csv file in a single read i.e. not line by line. Using
local $/=undef;
2. Split the file with "\n" delimiter into an array
3. Go through each array element and split the csv string into an array
All these work fine until I hit a string with some values follow a bunch of commas(i.e. no value). The array size stop at the last values and remaining commas with no value are ignored. Is this normal ?
Well... to get thing going... I push blanks until I get the right size.
Bandage job ! 




I am trying to extract data from csv files.
1. Read each csv file in a single read i.e. not line by line. Using
local $/=undef;
2. Split the file with "\n" delimiter into an array
3. Go through each array element and split the csv string into an array
All these work fine until I hit a string with some values follow a bunch of commas(i.e. no value). The array size stop at the last values and remaining commas with no value are ignored. Is this normal ?
Well... to get thing going... I push blanks until I get the right size.
Bandage job !