use EPrints::Session; use EPrints::EPrint; use EPrints::SearchExpression; use strict; my $session = new EPrints::Session; exit( 0 ) unless( defined $session ); my $newsroot = $session->get_archive()->get_conf( "news_path" ); my ($f, %l, $k, $f_time); my $top = 3; my $i = 0; foreach $f (<$newsroot/*>) { $l{$f} = -M $f; } foreach $k (sort { $l{$a} <=> $l{$b} } keys %l) { last if $i++ == $top; if ( -f "$k" ) { print "
"; open( FILE, "< $k" ) or die "Can't open $k : $!"; while( ) { print; } close FILE; print "
\n"; print "
"; $f_time = (stat( $k ))[9]; printf "Posted on %s", scalar localtime($f_time); print "
\n"; } }