# Load XML Config file... use XML::Simple; my $config = XMLin(); # Find the right config... # This should be the only commandline argument my $desired_config = $ARGV[0]; # Dump the config file.... use Data::Dumper; print Dumper($config); print $config->{$desired_config}->{database_type};