in reply to why doesn't this work
Perl 5 overloads the same punctuation for glob and readline, so the parser has to guess at whether you meant "read lines from file" or "search directory for files matching this pattern". In this case, it guessed incorrectly.
(I haven't read this part of the parser today, so this is an educated guess.)
|
|---|