in reply to while loop break when sub call

You really need to post the code within <code> tags as described in Markup in the Monastery at the bottom of the submit-page.

If you suspect that someting in sub() might be adversely affecting repeated calls to getgrent(), consider defining an array and pushing all matching names onto it.   Then, after the getgrent loop has finished, use a second loop to process the entries in the array.   Similar side-effects can happen e.g. when processing files within a loop that is scanning directories, on some types of machines.   So, first do one, then the other.

Replies are listed 'Best First'.
Re^2: while loop break when sub call
by papillon (Initiate) on Jan 09, 2015 at 15:26 UTC
    Hello,

    Sorry for forgetting the <code> tags.

    I tried to fill an array for matching groups name and then iterating that array and it work

    Thanks