in reply to why doesn't my array get extended?

Each time round your inner loop you reset @rrdgraph2 to an empty list with the following two lines:

@rrdgraph1=(); @rrdgraph2=@rrdgraph1;

That may well be your problem.

I can't access the full script, but it looks to me as tho' you don't use -w or use strict. These would force you to think more carefully about the scope of your variables and would therefore help you with problems like this.

Oh, and one other thing. The line

$png= join("",$graphdir,"/",$ds,$interval,".png");

would be much easier to understand as

$png= "$graphdir/$ds$interval.png";
--
<http://www.dave.org.uk>

"Perl makes the fun jobs fun
and the boring jobs bearable" - me

Replies are listed 'Best First'.
Re: Re: why doesn't my array get extended?
by marow (Initiate) on May 04, 2001 at 21:43 UTC
    yes, its gone now but thank you....I am very new to perl so all advice is welcome.....this strict and -w stuff bears closer examination....but I have a lord and master who doesnt bother with that sort of thing........gulp

      Then your lord and master is a fool and doesn't deserve your respect. You should sent him over here for some education.

      --
      <http://www.dave.org.uk>

      "Perl makes the fun jobs fun
      and the boring jobs bearable" - me