Skip to content

Instantly share code, notes, and snippets.

@brianmed
Created October 26, 2013 20:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianmed/7174104 to your computer and use it in GitHub Desktop.
Save brianmed/7174104 to your computer and use it in GitHub Desktop.
Attempt to create a sitemap.
[bpm@Orfgum] c:.../playground/sparky/lib>find . | grep Mojo | grep '\.pm$' | /opt/perl go.pl
[bpm@Orfgum] c:.../playground/sparky/lib>cat go.pl
BEGIN { print(qq(<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">)) };
while (<>) {
s#.*#<url><loc>http://mojo.us/$&</loc></url>#;
print;
}
END { print("</urlset>") };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment