sub get_section { print join ':', @_ ; for (@_) { print ; /\.dat/ && do {$file = join '/', ($docdir, $_); $pubdate = substr ($_, 1, 4); print "$file \:\: $pubdate\n" ; @dat = get_file($file) ; sort_dat(@dat) ; print_sect() ; } ; } }