mdsaleemj has asked for the wisdom of the Perl Monks concerning the following question:

hi all, i have inserted a compressed data(using lzop) in oracle using perl and while decompressing the data from database i am getting "header corrupted :end of line conversion". error. What i think is that data which got stored in database ie.,the newline got modified ...Do i have to use any binmode" concepts...because i use unix os and data which moves to DB,you know there will be mode change..please give me solution.

Replies are listed 'Best First'.
Re: doubt in binmode
by Corion (Patriarch) on Jun 28, 2010 at 09:15 UTC

    Most likely you didn't tell Oracle that you want the data stored as a binary blob. Have you verified that the data was stored correctly in the database? Using binmode never hurts, so you should always use it.

    I recommend you ask your Oracle DBA about your database and how to talk to it and how to verify what data gets stored in the database.

      but i stored the compressed data(lzop) in database as CLOB.

        Simple: Don't store binary data in a character-oriented storage. CLOB is a Character Large Object. You want a BLOB, a Binary Large Object.

        Alexander

        --
        Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)