note
broomduster
<blockquote><i>The magic diamond-operator <> only works if you stuff the filenames into @ARGV. </i></blockquote>
My reading of [doc://perlop#I/O-Operators] has me believing that using the diamond operator for globbing works as the OP seems to expect. Here's what I get with a simple test:
<c>
-> ls
file1.txt file2.txt file3.txt
-> perl -le '@files = <file*>; print @files;'
file1.txt file2.txt file3.txt
</c>
I may have missed something, but it looks to me that [kelder]'s [id://714612|expectation] of how globbing works with <c><></c> is right. Is there a platform difference to worry about? (OP is on a Mac, above test runs the same on a Mac and under NetBSD.)
714601
714622