How do you open a text file that has a different file extension in perl?

jimbo_carruth

New member
I have a text file from an program but the extension is .pch and the file type is Entrust Support File. Is there any way to open this file without first re-saving the file with a .txt extension?

CODE:

$punch = "file.pch";
open(FILE,$punch);
 
Perl doesn't care what the file name is. Are you getting some error, and your sidestepping the real issue and asking what you THINK is the right question, but it actually has NOTHING to do with the error you're getting? Don't feel bad, dozens of people do that every day. SHOW US THE ACTUAL ERROR MESSAGE. SHOW US ACTUAL CODE THAT WE CAN RUN AND GET THE ERROR.

open FILE, q{<}, 'file.pch' or die $!;
 
Back
Top