Re: Writing to file

From: R. Joseph Newton (
Date: 02/02/04

Date: Sun, 01 Feb 2004 19:33:57 -0800
To: Support <>

Support wrote:

> Hi all
> I have a little bit of code you may be able to help with.
> I load a file into an array with
> foreach $lines(@database_array) {
> @edit_array = split(/\:/,$lines);
> push(@member_array,\@edit_array);
> $x++;
> } #loop
> and then play around with the array a bit, then I would
> like to load it back into the file with
> while($count<$x){
> $newline = join('\:',@{$member_array[$count]});
> chomp($newline);
> print DAT "$newline\n";
> $count++;
> }

See if that is closer to what you want.


Relevant Pages

  • Re: fast stable sort
    ... For fastest load, at expense of slower sort, you ask the operating ... and you memory-map the file directly into that array. ... memory of your big array. ... possible to assure locality of reference and thus avoid thrashing ...
  • Re: Controller for Switching current sink
    ... The load, includes ... the switch closed with my monster-FET array. ... So, I'm gonna precharge the cap, then throw the switch at 0v. ... I calculate 1.5 joules in the cap, so the fet has to dump the same 1.5 ...
  • Re: How can I create a 2D ArrayList? String usually.
    ... I basically would like a 2 column array or whatever that will be static, ... in values won't change after I load them and I would like to fairly quickly ... > Array.IndexOf is probably going to yield linear performance as you add ... you might be better off using hashtables. ...
  • Re: problem with [array get ...] -> file -> string -> [array set ...]
    ... I'm pulling my hair out trying to save and load data to a file. ... got a large array (probably filled with all sorts of "special" ... puts "saving test to" ...
  • Re: editing a mysql record using php and website ?
    ... And then when I hit submit I want to insert the new data into the ... If you KNOW its a single record, load the data into an array and then index the array into the text fields. ... echo "<input type='text' name='txtvendor' ...