Is MSSQL, the ODBC Driver or Win32::ODBC introducing the NUL values?
I don't know, but MS-SQL you say? Is there any reason not to use DBI with DBD::ODBC? I don't know anything about Win32::ODBC, but I do know that I've used DBI with MS-SQL to great effect. If it's feasible, you might give this a shot. All things considered, having to clean the data is somewhat undesirable (though I'm sure someone will chime in with the fact that data from the database is marked as tainted, etc). Numbers should come back as numbers, not numbers with a NUL appended...

thor

Feel the white light, the light within
Be your own disciple, fan the sparks of will
For all of us waiting, your kingdom will come


In reply to Re^7: Avoiding Strange Win32::ODBC Return Values for Integers by thor
in thread Avoiding Strange Win32::ODBC Return Values for Integers (NUL) by jonix

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.