Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^3: Temporary text files with File::Temp

by John M. Dlugosz (Monsignor)
on Feb 26, 2008 at 07:55 UTC ( #670251=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Temporary text files with File::Temp
in thread Temporary text files with File::Temp

The problem is that the default for normal open and the default for temfile is different.

Teach to always specify the mode of a file, text or binary, because on some platforms it matters. For that matter, be clear about the character encoding too.

Maybe you should update the File::Temp module.

Or, write your own tempfile function that calls the regular open. That way you have consistent semantics. That's what I do.

—John


Comment on Re^3: Temporary text files with File::Temp

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://670251]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (11)
As of 2015-07-28 22:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls