in reply to Ouch! Each! Reentrant it is not

This reminds me of a similar issue with scalar glob, only there there's no remedy but to use list-context instead:
$ perl -wle' sub glob_limit { my ($pat, $max) = @_; my $i; print "pattern: $pat"; while ($val = glob($pat)) { print $val; last if ++$i == $max; } } glob_limit("{a,b,c}", 2); glob_limit("{p,d,q}", 3); ' pattern: {a,b,c} a b pattern: {p,d,q} c