sub SQLtoXML { $log->debug("Attempting to pull from MySQL DB and write to XML.." . "\n"); #Parameter being passed is the Source ID to check against the Database and final directory for XML file. my $PassedSource = $_[0]; my $FinalDir = $_[1]; my $FileName = ""; #Set up temporary XML output file for XML::Writer my $output = IO::File->new(">output.xml"); #Initiate XML::Writer my $writer = XML::Writer->new(OUTPUT => $output);