in reply to Re^2: while loop break when sub call
in thread while loop break when sub call
Yes, undoubtedly the creation of a new group broke the iterator. That sort of thing happens a lot, and it goes back to the underlying operating system primitives. For example, I’ve found that when iterating through files and directories in Microsoft Windows (regardless of language), you mustn’t create/remove files or directories while doing so. First complete the scan (e.g. of one complete subdirectory), then act upon/iterate through an in-memory list of the things that the scan finds, and all is well.