The users simple input an image url, and I want the image to come up valid everytime. The reason:
use LWP::Simple;
my $content = get $url;
die "Couldn't get $url" unless defined $content;
doesn't work is because that it dies if its nothing, but it goes through if its a bad image url, or just a folder, instead of dieing.
So my question is simple. How can I can I make a statement that determines if an image will produce something, or just an X box, or invalid image.
furthermore: if($url =spiffycommand=) { print "Good image, continue"; } else { print "Bad image. Go 'back'!"; exit; }
Happieness is like peeing your pants.
Everyone can see it, but only you can feel the warmth.
use LWP::Simple;
my $content = get $url;
die "Couldn't get $url" unless defined $content;
doesn't work is because that it dies if its nothing, but it goes through if its a bad image url, or just a folder, instead of dieing.
So my question is simple. How can I can I make a statement that determines if an image will produce something, or just an X box, or invalid image.
furthermore: if($url =spiffycommand=) { print "Good image, continue"; } else { print "Bad image. Go 'back'!"; exit; }
Happieness is like peeing your pants.
Everyone can see it, but only you can feel the warmth.