in reply to Re^3: FIle Upload Error Help!
in thread FIle Upload Error Help!

That I know works, I tried as well but 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. The $img has the image itself from the urls.

Replies are listed 'Best First'.
Re^5: FIle Upload Error Help!
by JavaFan (Canon) on Jul 21, 2011 at 19:46 UTC
    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.

Re^5: FIle Upload Error Help!
by cdarke (Prior) on Jul 22, 2011 at 07:20 UTC
    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;