in reply to Re: out of memory
in thread out of memory

I need to put that content into database table

is any other way to handle this scenario

Replies are listed 'Best First'.
Re^3: out of memory
by Corion (Patriarch) on Feb 14, 2013 at 12:13 UTC

    When loading data into a database, I recommend using the bulk loading tools available with the database. The easiest approach is to use Perl to write the available data to a new file in a format that is suitable to the bulk loading tool, either using fixed width or delimited rows of text, or SQL statements.

Re^3: out of memory
by choroba (Cardinal) on Feb 14, 2013 at 12:11 UTC
    If you are adding more than one row, you can probably process the file chunk by chunk and insert corresponding rows to the database one by one (or create a file the database can bulk-load). See also DBI.
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
Re^3: out of memory
by marto (Cardinal) on Feb 14, 2013 at 12:12 UTC

    You haven't provided some example file content. Essentially read the file one record at a time, insert the record into the database. This is of course a simplistic approach, and is perhaps not best suited to your system (number of records, database type etc) so creating a load file based upon your input may be a better idea.