CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner:
Writing into a file at once (not record by record)


New User

Oct 1, 2007, 12:57 PM

Post #1 of 2 (405 views)
Writing into a file at once (not record by record) Can't Post

Hi there,

We use perl for fetching records from an oracle table , validating each column in that record and forming a hash. Now this hash contains more than 100K records.

Now, we are writing each row in the file. This take more than 3 hours. Is there a way to write 10K records at one shot into the file and keep writing in chunks of 10K in perl? so that I/O is less and the files are created quickly.

If so, can you pls throw light on the same.



Oct 6, 2007, 10:27 AM

Post #2 of 2 (400 views)
Re: [sasirekha] Writing into a file at once (not record by record) [In reply to] Can't Post

What about looping the hash, reading 10k lines and building a single string from this, then writing the strings to the file?

(This post was edited by wgeoghegan on Oct 6, 2007, 10:28 AM)


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives