my $file = param('upload'); # This line print successfully print h2('File name'), $file; # But not the subsequent lines # Line 55 begins here print h2('File MIME type'), uploadInfo($file)->{'Content-Type'}; while (<$file>) { print; $length += length($_); } print h2('File length'), $length;