I am using Activestate PERL and compiling to code so people can use it and I am wondering if the following can be done.
1. Can I open a file, read the header to determind what kind of a file it is and validate the extention for the file?
In other words, before I copy the file myFile.jpg. I would read in the header and validate that it is a '.jpg' file.
I am not even sure how to approch this one.
Thanks for the help and examples.