in reply to Eps Files and perl
The advice to use a module that does this probably the best but if you should for some reason find yourself unable or unwilling to use or install a module you can determine whether a file is EPS because the start of the file will match the regular expression:
/^\%!PS-Adobe-\d+.\d EPSF-\d+.\d/
/J\
|
|---|