Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re^4: Use of uninitialized value $picby dazz (Beadle) |
on Apr 25, 2017 at 05:40 UTC ( [id://1188818]=note: print w/replies, xml ) | Need Help?? |
Hello
Yes, it wasn't a good night for troubleshooting code. I have incorporated your suggestions and fixed the code. I used a hash because I have a couple of switches and args that determine which camera is being used and where the files should go. Moving onto my next problem. I want to call a subroutine ImageNotDark. I want to pass an Image::Magick object ($pic). By design, the object is not changed inside the subroutine. My problem is that I am not passing the image object correctly. The code snippet at the start of the subroutine is as follows: So the debugger shows that $iutImage is not initialised. At test point A, I temporarily added code to save the $pic image to a file. I was able to confirm that $pic holds a valid image. So I am reasonably certain the problem is the way I call the subroutine and attempt to pass the image. Any tips would be much appreciated.
In Section
Seekers of Perl Wisdom
|
|