As you can see, the third call to glob returns the expected value.
Here's how glob is documented in the perlfunc document[1].
glob In list context, returns a (possibly empty) list of filename
expansions on the value of EXPR such as the standard Unix shell
/bin/csh would do. In scalar context, glob iterates through such
filename expansions, returning undef when the list is exhausted.
Not true.
As you can see, the third call to glob returns the expected value.Here's how glob is documented in the perlfunc document[1].
[1]: http://perldoc.perl.org/functions/glob.html