Why does glob lstat matching entries?
Looking into behavior in this question , I was surprised to see that perl lstat() s every path matching a glob pattern: $ mkdir dir $ touch dir/{foo,bar,baz}.txt $ strace -e trace=lstat perl -E 'say $^V; <dir/b*>' v5.10.1 lstat("dir/baz.txt", {st_mode=S_IFREG|0664, st_size=0, ...}) = 0 lstat("dir/bar.txt", {st_mode=S_IFREG|0664, st_size=0, ...}) = 0 I see the same behavior on my Linux system with glob(pattern) and <pattern> , and with later versions of perl. My expectation was that the globbing would simply opendir/readdir under the hood, and that it would not need to inspect the actual