[tpm] how to delete array entries en-passant

arocker at vex.net arocker at vex.net
Wed Jun 30 09:31:40 PDT 2010


>
> OK, let me give you the specific example...
> The array contains all of the lines of a file...
> The foreach is used to loop over then, and 'take action' upon them.
> But when I'm done I want all the empty lines stripped from the array
> ('just
> because!')
>
Does the process require the presence of the entire file in memory before
the loop, and the shuffled-down file afterwards? Do you output the
remaining lines?




More information about the toronto-pm mailing list