#!/usr/bin/env perl

use strict;
use CGI qw(standard);

my $q = new CGI;

my $fileName = "/usr/local/websites/asylum/htdocs/htdocs/export/list.xml";
my $htmlXSL = "/usr/local/websites/asylum/htdocs/htdocs/export/makeHTML.xsl";
my $htmlFn = "/usr/local/websites/asylum/htdocs/htdocs/export/exports.html";

my $cmd = "xsltproc $htmlXSL $fileName > $htmlFn";
`$cmd`;
if ($?) {
    die "Failed to create the HTML file\n";
}

print "Status: 302 Moved\nLocation: /export/exports.html\n\n";

