Don't ask to ask, just ask | |
PerlMonks |
Re^2: Prob with 'while' loop and subroutine callingby cool (Scribe) |
on Aug 18, 2006 at 21:12 UTC ( [id://568265]=note: print w/replies, xml ) | Need Help?? |
Dear GrandFather, First of all, thanks for taking so much pain for my problem. In the code I posted, mistakenly graph()(line 126) left out while pasting.The code I have pasted is working and giving results. But without 'use warning' I don feel confident. And also global variable of this code are interfering with rest of my code(actually this piece is part of a large work). For whileloop case, I didn't get, what is prompting it to run over complete array. like it is not written as while (@x) or while ($fh) So what I think is, this should run only once when it enters in the sub; when for the first time control enters the loop while($incEnergy > $minEnergy)What is prompting it to return? I know its something v silly that I am not getting, but pl guide me.Can you pl explain me how this part of your code is working!! Just briefly, what is the concept behind or some link.. Also while compiling its showing this line Global symbol "$x1" requires explicit package name at monk_graph.pl line 150.
In Section
Seekers of Perl Wisdom
|
|