#!/perl/bin/perl # # imagexy.pl -- script to return width and height of image(s) use strict; use warnings; use diagnostics; use Image::Size qw(:all); my $scale; if ($ARGV[0] =~ /\d+/) { $scale = shift; } for (map {glob} @ARGV) { my ($x,$y,$id) = imgsize($_); if ($scale and $scale gt '1') { print "$_ width=",$x/$scale,"in, height=",$y/$scale,"in\n"; } else { print "$_ width=$x, height=$y\n"; } }