in reply to dereferencing problem

use Image::Size;

merlyn's old article has the details.