#!/usr/bin/perl -wT use strict; use warnings; use XML::Simple; # used to read the xml config file eval { my $parser = new XML::Simple(keeproot => 0); my $config_file = "blah.xml"; my $config_path = "/www/common/data"; my $file= "$config_path/$config_file"; my $_Config = $parser->XMLin($file); print "Content-Type: text/plain\n\n\$_config = $_Config \n"; }; if ($@) { print "Content-Type: text/plain\n\n$@\n"; }