I'm not accustomed to needing to specify the argument within the code
Since the discussion started as a comparison against python, I wanted to play fair-ish and have code that actually does the same thing (technically, the same thing as the perl version in the OP). That's why I didn't include the glob version in the first place, or didn't print the result
Of course, looking closely only one of your loops needs to be of the 'while' variety
Nice catch! I'm far too used to using while for files to have seen this one :-).