Link to home
Start Free TrialLog in
Avatar of tr5
tr5

asked on

Undefined hash reference error using CGI's uploadInfo()

Hi
I get an "undefined hash reference error" when I use uploadInfo() in this code. The keys of %vars are  
"input type = file[]":

1 my %vars = $cg->Vars;
2 while(($key,$value) = each %vars)
3 {
4    my $fh = $cg->upload($key);
5    $file_name = $cg->param($key);
6    $file_type = uploadInfo($file_name)->{'Content-Type'};
7 }

Line 6 gives me the error.

Any ideas?
ASKER CERTIFIED SOLUTION
Avatar of FishMonger
FishMonger
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial