Need help in reading file to array - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Need help in reading file to array

I want to open a file and put the new stuff at the beginning of the file without overwriting the rest of the stuff, so I first put the file contents in an array using @array= and then opened the file for writing, put the new stuff and then wrote the array. I am getting a problem with this however , it seems I keep getting some spaces at the beginning of new lines. any help would be welcome


Comments

  • : I want to open a file and put the new stuff at the beginning of the file without overwriting the rest of the stuff, so I first put the file contents in an array using @array= and then opened the file for writing, put the new stuff and then wrote the array. I am getting a problem with this however , it seems I keep getting some spaces at the beginning of new lines. any help would be welcome

    :



    you will want to take a look at "unshift" search that at www.perl.com






    URL:http://plebian.com

Sign In or Register to comment.