Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Multiple command prints in same output file

by bofh_of_oz (Hermit)
on Jul 08, 2005 at 15:19 UTC ( [id://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?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://473444]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-24 07:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found