Hi all 

I am trying to find the file type of a file being uploaded

im using CGI.pm for uploading the file

here is the code 


**********************************************************

$filename1 = $q->param("test_file");
my $uploadFileHandle = $q->upload("test_file");
my $test;


$type = $q->uploadInfo($filename1)->{'Content-Type'};

***********************************************************

$type = $q->uploadInfo($filename1)->{'Content-Type'}; 


the above particular statement gives me an error 

Can't use an undefined value as a HASH reference


i recollect using the same code and it worked earlier 
but that was on a different version of CGI.pm(not sure which)
so i suspect the version of CGI.pm

what am i doing wrong here also 
how to find the version of an installed module in the perl 
lib

Thanks for any suggestions

Sudhir

Reply via email to