use LWP::Simple; local $\ = "\n"; # add newline to print print +(head('http://perlmonks.org/images/monk1sm.gif'))[1]; #### use LWP::Simple; use Image::Info qw(image_info dim); my $raw = get('http://perlmonks.org/images/monk1sm.gif'); printf "WxH: %dx%d\n", dim(image_info(\$raw));