Re: Need help with a question.



Trev <trevor.dodds@xxxxxxxxx> wrote:
On Jun 28, 1:40 pm, Ben Morrow <b...@xxxxxxxxxxxx> wrote:
Thanks Ben for the detailed reply, I've been able to get the output
correct, but I'm stuck on how to read $cpqlogline into an array
without writing it to a file.

I suppose with "read into an array" you meant storing the value in an
array. Please see e.g. "perldoc -f push".

However, there is no need for that. Why not write the output file line
by line simultaneously as you process the input file line by line?

jue
.



Relevant Pages

  • Re: Need help with a question.
    ... push @array, $cpqlogline; ... print OTF $DAT; ... above sub writes everything into mactmp.txt then only CreateLog is run. ...
    (comp.lang.perl.misc)
  • Re: Unable to initialize values
    ... > three CandyBar structures, use new to allocate the array ... > still having trouble initialize them. ... > I'm kinda stuck. ...
    (comp.lang.cpp)
  • Re: Comparing strings character by character and incrementing a value by one if they are equal.
    ... this is a simple thing here and I am stuck. ... Basically I'm comparing horizontally to total a test score and vertically to ... > You need to initialise each element of that array to 0. ... > You need to output the totals at the end. ...
    (comp.lang.cpp)
  • Re: tree
    ... To avoid malloc() you *could* use an array ... of struct nodes. ... So where are you stuck? ...
    (comp.lang.c)
  • Re: Array
    ... I have got to grips with the basics, but have got stuck ... For array B: remove 314,318,321 and 502 ... I would set limits, eg. keep values between 220 and 260, but the ... a typical method is to take an average and standard deviation then ...
    (comp.soft-sys.matlab)