Re: get list of files sorted by date

2009-09-29 Thread Jeff Peng
2009/9/29 Andreas Moroder : > Hello, > > according to the man glob can only sort by name. Is there a way to get a > list of files sorted by date ? > sure. first I will use unix's ls command like ls -ltr. in perl one of the ways: my @sorted = map { $_->[0] } sort { $a->[1] <=> $b->[1]

Re: get list of files sorted by date

2009-09-29 Thread Алексеев Александр
print join "\n", sort {(stat $a)[8] <=> (stat $b)[8]} glob "./*"; -- Alexandr A Alexeev http://www.unixcommunity.net/ Andreas Moroder пишет: Hello, according to the man glob can only sort by name. Is there a way to get a list of files sorted by date ? Bye Andreas -- To unsubscribe, e-m

get list of files sorted by date

2009-09-29 Thread Andreas Moroder
Hello, according to the man glob can only sort by name. Is there a way to get a list of files sorted by date ? Bye Andreas -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/