|Problems? Is your data what you think it is?|
Re^2: Parsing CSV only returns the second line of the fileby saint_geser (Initiate)
|on Sep 01, 2012 at 09:54 UTC||Need Help??|
Thanks guys for your replies! I'm still quite confused. This is my first perl script and I haven't done any programming since uni.
The reason it wouldn't compile (works fine for me) is because I have perl as a part of proprietary mining software which has their own extension modules installed, e.g. Lava. I don't get any errors or warnings when running it.
The part of code that does the parsing I got from somewhere on the internet and modified for my purpose and I'm not quite sure where the inner while cycle is from. I'm pretty sure it shouldn't be there.
So I've commented out the inner cycle and moved the part where I open TEMP file for editing and insert two lines up the top out of the outer cycle. Now this part of code looks like this:
The output that I get now has only the top 2 and bottom 2 lines:
I still can't figure out how to make parsing work properly. I'm actually very confused about this line:next if ($. == 1);
It says next if line number equals to 2? In the example that I saw it parsed the whole file but here does it just parse the second line?