use File::DosGlob qw(bsd_glob); # to get sane whitespace semantics my $pattern = '/home/kelder/files/*.txt'; @ARGV = glob $pattern; #### Ai0.txt Ai1.txt Ai2.txt ... Ai10.txt Ai11.txt #### Output: File1 File10 File11 File2