#!/usr/bin/perl -w use strict; use 5.010; # gensitemapxml.pl - assume public directory tree of apache default indexed directories BEGIN { say ' ' } my $base = 'https://users.aalto.fi/~ltuuri'; my @paths = `find . -type d -printf '%p\t%TY-%Tm-%Td\n'`; for my $line (@paths) { chomp $line; my ($path, $lastmod) = split(/\t/, $line); $path =~ s,^\.,,; # remove trailing . say " ${base}${path}/ $lastmod "; } END { say '' }