$x = $image->Read(...); warn "$x" if "$x"; # string context: the error/warning message (if any) print 0+$x; # numeric context: the number of images read