#!/usr/bin/perl use strict; use warnings; use CGI; use LWP::Simple qw(get); use Image::Size qw(imgsize); my $url = 'A STRING TAKEN FROM PATH_INFO'; my $img = get($url); my ($width, $height) = imgsize(\$img); print "$url is ${width}x${height}\n"; my $q = new CGI; # create new CGI print $q->header, $q->start_html('Image measuring'), $q->('The size of your image is:'), $q->("$url is {$x}x{$y}\n"), $q->end_html;