in reply to Error Handling

You might want to look into PerlMagick - the Object Oriented interface to the ImageMagick goodness.

Here's the PerlMagick way to do what you're doing. It will also give you some better error handling.
use Image::Magick; my $photo = Image::Magick->new(); my $x = $photo->ReadImage($input); if ($x) { warn $x; # This will catch any bad files or serious errors in reading the ima +ge } my ($height, $width) = $photo->Get('height','width');
You can find your other attributes here on the PerlMagick page.