|XP is just a number|
Use of uninitialized value $picby dazz (Sexton)
|on Apr 24, 2017 at 08:54 UTC||Need Help??|
dazz has asked for the wisdom of the Perl Monks concerning the following question:
I am stuck trying to debug a small piece of code.
This code grabs an image from an IP camera on my home network, timestamps the filename and then should save it to a file.
No matter what I do, I can't get past the uninitialised value error reported in the debug output below.
The most obvious bug would be that $snapshot->grab; is empty.
I have cut/pasted the URL from the code into my browser to make sure that the URL is correct and that I get an image. So I am reasonably confident that Grab is getting a valid image. As far as I can tell, $snapshot should hold a valid image but I don't know how to test the contents of $snapshot->grab; without first saving it to a file.
This code is running on a headless PC that I ssh into.
Google hasn't helped solve this problem.
The debug output is as follows: