Re: csv parse bug...



"Prasad Gadgil" <prasad.gadgil@xxxxxxxxx> wrote in
news:1121946386.338358.297250@xxxxxxxxxxxxxxxxxxxxxxxxxxxx:

> If I have wrongly posted this here instead of reporting this as a
> module bug, pl excuse me.

You have posted in the right group, but in the wrong way.

You need to produce a small but complete script, together with some
data, that still displays the problem.

That way, we can easily test alternative hypotheses about your problem.

Please consult the posting guidelines for this group. Read especially
about the __DATA__ filehandle.

> I am facing an odd bug when using parse() function in Text::CSV
> module. This is an absolutely textbook use of the function which fails
> for some 30 records out of ~ 25000 records.

Obviously, we don't need 25,000 records. All we need is some data where
things work the way you expect them to, and some where they don't along
with a short but complete script we can run just by copying and pasting.


> I have checked, and have found a very strange pattern. In one of the
> possible fields which will have embedded commas qualified by double
> quotes (like "CN=XX ,OU=XX,OU=XX,DC=XX,DC=XX"), if a pattern line "
> ,OU" appears, the parse fails... which means if there is a space
> before the embedded comma in one of the comma seperated fields, the
> parse fails.

I am not quite sure about the exact format of the data for which you
claim the parser fails. As I said, show us code, show us real data.

> The code where I exit from the code with parse error is pasted
> below...

But it is not a complete script we can run by copying and pasting.

Sinan

--
A. Sinan Unur <1usa@xxxxxxxxxxxxxxxxxxx>
(reverse each component and remove .invalid for email address)

comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
.



Relevant Pages

  • Re: csv parse bug...
    ... > If I have wrongly posted this here instead of reporting this as a ... > module bug, pl excuse me. ... > possible fields which will have embedded commas qualified by double ... >,OU" appears, the parse fails... ...
    (comp.lang.perl.misc)
  • csv parse bug...
    ... module bug, pl excuse me. ... I am facing an odd bug when using parse() function in Text::CSV module. ... This is an absolutely textbook use of the function which fails for some ... possible fields which will have embedded commas qualified by double ...
    (comp.lang.perl.misc)
  • Re: require and the site_ruby directory...
    ... Just Another Victim of the Ambient Morality wrote: ... One way that it is defective is that it can't always parse the links of a page. ... The strange thing is that it works find for some pages but completely fails for others. ... I have yet to run into public Ruby libraries which require you to copy them into the Ruby directory. ...
    (comp.lang.ruby)
  • Re: Text to Date(MM/DD/YY) Conversion
    ... >You should be able to use the CDate function to convert ... If that fails, you can parse the date into the ...
    (microsoft.public.access.conversion)
  • reviewing Hacmp.out files
    ... I need a way to parse ... hacmp.out files on 2 node cluster why every week the ... node b fails to bring all resources back. ... HP-UX System Administration Certified ...
    (AIX-L)