I found this piece of wisdom in the PerlFaq quoted in a chat board from 2000.
Is there a leak/bug in glob()?
Due to the current implementation on some operating systems, when you
use the glob() function or its angle-bracket alias in a scalar
context, you may cause a leak and/or unpredictable behavior. It's best
therefore to use glob() only in list context.
5.18: Is there a leak/bug in glob()?
(contributed by brian d foy)
Starting with Perl 5.6.0, "glob" is implemented internally rather than
relying on an external resource. As such, memory issues with "glob"
aren't a problem in modern perls.
Use The Source Luke and the Commit History