Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Re: why doesn't my array get extended?

by hdp (Beadle)
on May 05, 2001 at 21:11 UTC ( [id://78257] : note . print w/replies, xml ) Need Help??


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

That turns out not to be the case. To "make the graph0 array as a whole an element of the graph2 array", one would use something like push @rrdgraph2, \@rrdgraph0. push @rrdgraph2, @rrdgraph0 does the same thing as your foreach loop, but is more efficient.

I suggest reading perldsc at least so that you understand why your solution is incorrect.

hdp.