in reply to Dynamically breaking up a data set

Why can't you just count the packets in $packet_count, and if there are 10 of them, just start counting from 0 again?

Replies are listed 'Best First'.
Re^2: Dynamically breaking up a data set
by Anonymous Monk on May 23, 2012 at 12:22 UTC
    I'm new to all this, could you please give me a hit where to initialize, ++ and undef this variable?
      Declare it before the loop so its value is kept on each iteration. ++ it on each packet, clear it when you output the XML (i.e. after 10 steps).
        thanks. Took you advice, tough I had 2 problems. I had to remove the "return" and change the if so that it catered for odd numbers of entries, where they weren't multiples of 10. Thanks