Page 1 of 1

no halting if object is pushed multiple times

Posted: 2015-04-02T13:26:48-07:00
by gubach
I want to push an image object with one image multiple times in an other image object, but for $A > 2 this seems not to halt

Code: Select all

for ($p = 1; $p <= $A; $p++) {
	push(@$img_list, $img);
};  
Have also tried push(@$img_list, @$img); Only if $img is written and multiple times read it works. The same problem is shown if image object $img has several images.

Any suggestions to fix this? Thank you!

Re: no halting if object is pushed multiple times

Posted: 2015-04-03T06:04:10-07:00
by magick
Use
  • push(@$img_list, $img->Clone());