So, you're assuming that read is some magical function which you can feed a URL? Where did you get that idea from? And if you think that you can feed read a URL, why didn't you try to read to fetch the document containing the URL to the image?
I'd use LWP::Simple and its getprint method. That will take a URL, and write it to the selected filehandle. Which is what you want. | [reply] [d/l] [select] |
I would like to read this image file before using the code inside of the while loop. Just in case the image been uplaoded is too big
Not a good way of finding out the file size, the simplest is to use -s. For example: my $size = -s IMAGE;
or :my $size = -s $filename;
| [reply] [d/l] [select] |