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-Ty pe'};
7 }
Line 6 gives me the error.
Any ideas?
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)->{'
7 }
Line 6 gives me the error.
Any ideas?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.