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:

&CreateLoadFile if &FindRoot;
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...

--------------------------------
An idea is not responsible for the people who believe in it...


In reply to Re: Multiple command prints in same output file by bofh_of_oz
in thread Multiple command prints in same output file by johangr

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.