Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Temp file strategy

by osunderdog (Deacon)
on Sep 15, 2005 at 15:55 UTC ( [id://492301]=note: print w/replies, xml ) Need Help??


in reply to Temp file strategy

File::Temp is probably the best place to start.

use constant TEMP_FILENAME_TEMPLATE=>File::Spec::Unix::tmpdir() . "myt +mp_XXXXXXX'; my ($tempfh, $tempFilename) = File::Temp::tempfile( TEMP_FILENAME_ +TEMPLATE, UNLINK=>1); # Write the job text to the temp file. print $tempfh $resultJobText; # Close the file (flush) close($tempfh);

Hazah! I'm Employed!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2025-06-22 18:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.