# image.pm: package image; use strict; use warnings; use Image::Size (); my $img = "/tmp/test.jpg"; no encoding; # this doesn't help my ($x, $y, $i) = Image::Size::imgsize($img); print "$x,$y, $i\n"; 1; # image.pl: #!/usr/bin/perl use strict; use warnings; # comment out next line to get it working use encoding "utf8"; use image;