my $info = image_info("image.jpg"); if (my $error = $info->{error}) { die "Can't parse image info: $error\n"; }