in reply to Reading and displaying JPEG attributes
Not strictly a Perl solution but ImageMagick comes with a utility called identify which prints out image attributes in a nice parseable format. Or you could use the Perl interface to ImageMagick, PerlMagick, which others have mentioned.
Do not seek to follow in the footsteps of the wise. Seek what they sought. -Basho