in reply to Detecting 'binary' in a variable
In Perl 5.8, you can open a virtual filehandle on a scalar reference. That might do the trick for you. If you are using an older perl, Tie::Handle::ToMemory does the same thing. You could then use the file test operators, or something like File::Magic. If that doesn't work for you, you can try to match a specific signature for an Excel file (or whatever you might get) with what you see in the uploaded data, but that's a lot more work.
Good luck!
|
|---|