http://www.perlmonks.org?node_id=991125


in reply to Re: Parsing CSV only returns the second line of the file
in thread Parsing CSV only returns the second line of the file

Could you please elaborate on that. I don't know much about perl, you're right but it is really annoying to do all these files by hand.

  • Comment on Re^2: Parsing CSV only returns the second line of the file

Replies are listed 'Best First'.
Re^3: Parsing CSV only returns the second line of the file
by Anonymous Monk on Sep 01, 2012 at 07:05 UTC

    Could you please elaborate on that.

    Find places in your code, say, a loop inside a loop, where you use the modulus operator, say like "% 1"

    Then compare that line to my code, esp the output

    When do you think that inner loop will end?

Re^3: Parsing CSV only returns the second line of the file
by Anonymous Monk on Sep 01, 2012 at 07:14 UTC

    Here is a better one, what do you think the inner while loop does, what is its purpose?

Re^3: Parsing CSV only returns the second line of the file
by Anonymous Monk on Sep 01, 2012 at 07:21 UTC

    Here is another hint, how many times do you get this warning (after you add the code)?  if( warn "calling parse " and $csv->parse($_) ) {