Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: Multiple command prints in same output file

by bofh_of_oz (Hermit)
on Jul 08, 2005 at 15:19 UTC ( #473444=note: print w/replies, xml ) Need Help??

in reply to Multiple command prints in same output file

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...

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://473444]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2017-02-21 23:39 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (321 votes). Check out past polls.