Might I ask where you found or were inspired by this code?
my $graph_links = join ('', @graph_links); @graph_links = split (/\s+/, $graph_links);
As I've seen it here before and it's really rather backward code. What you're doing is joining all the elements of @graph_links on a empty delimiter to produce a string, and then splitting the string on all the whitespace to produce @graph_links without whitespace. It would make much more sense to just leave out the whitespace in the first place (in your particular case) and completely skip that.

Also, what are you trying to achieve in that inner loop? All you're doing is looping 96 time and pushing the results of plot_graph() onto @graph_links plus some extraneous whitespace, which makes the @points array a little redundant. Perhaps you mean to create the @graph_links array like this

## don't bother with @points as it looks to be redundant push @graph_links, ( /^(\d{1,2})$/ ? plot_graph (\@temps, \@new, $1) : undef );
Then when you iterate over the @graph_links array later on, skip any elements that aren't defined e.g
for my $p (@graph_links) { next unless defined $p; print ... }
This way any undefined elements will be skipped so you should get the effect of 1-11, 13-96.
HTH

_________
broquaint


In reply to Re: Re: Re: Working with values that dont exist by broquaint
in thread Working with values that dont exist by Anonymous Monk

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.