|Perl: the Markov chain saw|
Re: Multiple command prints in same output fileby bofh_of_oz (Hermit)
|on Jul 08, 2005 at 15:19 UTC||Need Help??|
Just a few suggestions...
- First, let me support others in strongly encouraging you to use strict... That should lead you to a much clearer view on how your code is working (as opposed to how it supposed to work). Writing a program without properly declaring variables can lead to all sorts of interesting though unpredictable behaviour (not to mention that the code then looks very VB-ish...)
- I am kinda puzzled that you can get any data at all, as your @DescribeData is not in the scope of Main_Process, where you parse its values... just as @ComponentData is not defined in the scope of FindTag.
- I believe that it would be clearer if you just passed $_ as an argument to ProcessGetViewInfo instead of letting Perl decide how it might wanna do it... It might work as desired but then again, it might not.
- Try making your functions return values instead of using (variables declared in those functions) outside the functions. That way, you can write:
instead of declaring $RootFound in FindRoot() and use it in the function that calls FindRoot...
Hope this helps to figure out where the problem is and fix it...
P.S. Oh, and also try to insert print statement(s) just before you call CreateLoadFile. Use it to print the values of the variables you are printing to the file... When you see it in the console, you might get a better idea of what's going on...