Hi the output file should be an .XML file which i believe is in the code as "c_vents.xml" I am just ensure of which arguments to parse on the script to generate the .XML file
i tried running the script as follow: perl create_s_t_xml.pl -v 0.1 and it ge , why does it not generate the .XML file ?
| [reply] |
printf(" <Unc>\n <ProcessArea name=\"%s\">\n", $box);
printf(" </ProcessArea>\n </$area>\n");
printf while <COXML> ;
will output by default to STDOUT (which usually is the terminal), but this need not be the case; see select. From the code I've seen, I would expect some output to the terminal, not to a file.
... the output file should be an .XML file which i believe is in the code as "c_vents.xml" ...
The code
my $cvents = "c_vents.xml";
if (-f $cvents)
{
open(COXML, $cvents ) || die("Cannot Open $cvents");
printf while <COXML> ;
}
tries to open the file c_vents.xml for input and then print the contents of the file, probably to STDOUT; see above for the justification for this guess.
In addition to the points made above, I would ask the following questions, some of which have already been asked by others:
-
Is main() ever executed? How do you know?
-
Operation of the script depends on the presence of certain files, e.g., ../vents.v$version.pl and apparently whatever $XLFILE is. Do these files exist in your testing configuration? Is your current working directory correct to access the relative path of at least one of these files?
-
What's going on in functions like print_t_xml_hdr() create_t_recs() print_t_xml_tail() which may be generating some kind of output, but which we are never shown?
-
What are the contents of global variables like $XLFILE @SBoxes %P_UCventList on which the operation of the script (and the generation of output) seems to depend, but which we are never shown?
Normally I would ask to see the entire script, but I'm afraid to do that because what you have shown us so far is such a terrible mess; I really don't want to start a fight with this tar-baby.
Give a man a fish: <%-{-{-{-<
| [reply] [d/l] [select] |