The question here, though, is why CGI's param method is returning a typeglob. Possibly the method performs differently in a string context?
...
CGI is probably giving you a filehandle...
That is it -- See (directed at OP) the 'CREATING A FILE UPLOAD FIELD' section in the
CGI docs ..
When the form is processed, you can retrieve the entered filename by calling param():
$filename = param('uploaded_file');
The filename returned is also a file handle.
So the
split //, $var works because it's scalar context so is the filename.. Otherwise it must be treating it as a handle, and hence the observed error..