use Image::Info qw(image_info image_type); my $info = image_type(\$binary_data); for (keys %{$info}) { print "$_ => $info->{$_}\n"; #funktioniert } print $info->{image_type},"\n"; #funktioniert NICHT!!