First, how do you defing "find JPEG"? By extension only? by content? File::Find (or File::Find::Rule) and File::MimeInfo::Magic are you starting places for doing it in perl. However, could you just do this in the shell instead?
# just a driectory:
ls /some/dir/*.jpg > /tmp/list.txt
# recursive solution:
find /some/dir/ -name *.jpg > /tmp/list
# a directory, but look at content:
file /some/dir/* | grep -i jpeg