I was just looking at Can someone tell me how to create an array of directory contents?. Unsurprisingly, file globs were offered as an answer. What surprised me was that the p
That perldoc you linked says there's some issues with the angle-bracket syntax:
One level of double-quote interpretation is done first, but you can't say
<$foo>
because that's an indirect filehandle as explained in the previous paragraph. (In older versions of Perl, programmers would insert curly brackets to force interpretation as a filename glob:<${foo}>
. These days, it's considered cleaner to call the internal function directly asglob($foo)
, which is probably the right way to have done it in the first place.)
I mostly use File::Find and its ilk myself.