in reply to date sorted files into an array

I'd probably use readdir and stat but here is kind of a fun way to use the system's find program. Plus it means you can use all the arguments that find supports like -ctime for example.
#!/usr/bin/perl -w # purpose: use find program for getting a list of files into an array. # author: chad clark, 2004-08-02 use strict; use Data::Dumper; my $dir = "/tmp"; my $cmd = "find $dir -type f"; open LS, "$cmd|"; my @ls = <LS>; close LS; chomp @ls; print Dumper(\@ls); exit(0);