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.

if(@$x1) { $$max = $y->[-1] if $y->[-1] > $max; $$min = $y->[-1] if $y->[-1] < $min; } else { $$min = $$max = $y->[-1];}


In reply to Re^2: Prob with 'while' loop and subroutine calling by cool
in thread Prob with 'while' loop and subroutine calling by cool

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.