Hi Scott,

> In my constant effort to improve my perl conversion project, I have a
> question regarding file reading.  I am taking two files and combining
> them in an array and then writing out a new file.  Is there a way to:
> a)strip out the first line of the second file
> b)test for conditions based on what is on the next line on the file
> An example, I start the array on file one, then mid-way I start another
> array on the second file (this array within in the first).  I need to
> check the next line in the file for a condition to exist.
> I have tried this, but run into the pointer resetting on each pass.
> Any thoughts would be appreciated.  Thanks in advance.

Use explicitly array pointers instead of the 'built-in' ones, then:

your need to look-ahead becomes array[$ptr + 1] 
avoiding the first record becomes for ( $i=1; $i<$last; $i ++ ) //instead of $i=0

Does that cover things?

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to