Here's an example. $image_file_fh is the file handle returned by CGI::upload(). The parameter to imgsize() can also be a file name.
If you want to check the file extension, you can ignore periods in the middle like this:
(Using 'die' in CGI scripts is generally not a good appproach. But these are just examples, and I wanted to keep them simple.)
This message has been edited by Dave_L on December 09, 2000 at 10:04 AM