> is the file well defined with white space separation? is the third field
> always the last field of non-whitespace?  is the value of the third
> field always 0 to start? is it always replaced by its line number? if
> those are all yes, then you can do this and it will blow away your
> example in speed (untested):
>

Thanks for your response. I apologize for not being clearer.  I have a
three-column file that describes a bunch of parameters:

TYPE1  NAME1  VALUE1
TYPE 1 NAME2  VALUE2
....

The first two are identifying strings that never change values.  The
values are floating numbers.  This file is read in by an external
program that does some parameter dependent crunching.  For each
iteration, while I only vary the values I write the whole file.  My
thought was that if I could some how tie the array of values to the
file column, I could both avoid opening and closing the file and
perhaps shave off a bit of time.  I'll give File::Slurp a try with
some benchmarking.

Thanks.

D

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to