executing code on files in the sorted order -help!

Say i have 2 files in the giving format:
file1
1 2 3 4
1 2 3 4
1 2 3 4

file2
1 2 3 4
1 2 3 4
1 2 3 4

I have a PERL code (loaned by one of u -i forgot who - thanks!) that extracts the 2nd column from each file and append horizontally to a new file:

perl -ane 'push @{$L->[$.]}, $F[1]; close ARGV if eof;
END { shift @{$L}; for $l (@{$L}) { print join (" ", @{$l}), "\n"; }}' * >> out.txt

Which does the job for over 900 files --but I think it's doing it randomly. The files have an alphanumerical name that follows a chronoloigcal order --and that's the order I would like them to be appended in.

How edit the script so that the job is executed as such.

desire final result: (disregard the spacing)
file1 file2
2 2
2 2
2 2

thanks in advance --!!!!

The * wildcard expands to an alphabetic list of file names. If you want it sorted differently, try something like ls * | sort -options -here | xargs perl -ane 'script goes here'

Read the sort manual page and play with ls * | sort | less to see what options exactly will work for you. Remember that your locale settings might affect sort order, too.