I'm trying to get perl to check the contents of a file and return the actual mime type to help verify the file extension associated with the file. I can do this on my own server by using:
$type = `\bin\file $filename`;
but it isn't a very universal way of doing this.
Is there a better way, preferrably without specialized modules, but if that is the way to go, let me know that too.