http://www.perlmonks.org?node_id=145824


in reply to checking file types in a perl upload script

I assume you don't mean to match filename on /.jpg$/.

If you read `perldoc -m Image::Size`, it shows what a JPEG header looks like.