in reply to Re^5: to copy certain content in file & repeat it .
in thread to copy certain content in file & repeat it .

i am not using push because my file is very huge around 400 lines so i dont want to run out of mem and also i am not using any module .. so if you can write the certain part where i am making mistake.
  • Comment on Re^6: to copy certain content in file & repeat it .

Replies are listed 'Best First'.
Re^7: to copy certain content in file & repeat it .
by Anonymous Monk on Jul 01, 2011 at 11:20 UTC

    i am not using push because my file is very huge around 400 lines so i dont want to run out of mem

    If you're concerned about memory, why did you chose the approach of building an array?

    If you want your program to work , given the approach you've chosen, you have to put data in the array, otherwise there is no data to print later (at which point you can empty the array).

    and also i am not using any module ..

    How is that relevant?

    so if you can write the certain part where i am making mistake

    No thanks. I explained in sufficient detail how you should make the changes. If I make the changes for you, you learn nothing. I'm attempting to teach you to fish (Give a fish or teach to fish?), if you're willing.