Best practice for variables shared between processes?

Peter Haworth pmh at
Tue Sep 21 15:17:41 BST 2010

On Tue, 21 Sep 2010 19:07:07 +1000, Daniel Pittman wrote:
> David Alban <extasia at> writes:
> > On Mon, Sep 20, 2010 at 4:13 PM, Daniel Pittman
> > <daniel at> wrote:
> >> Just make sure it is a move, not a copy, of the file; at least
> >> one developer around me has dropped in File::Copy::move when they
> >> got a plain rename refused because it crossed devices â so ended
> >> up copying the data in anyway.
> >
> > if you do need a copy, hard linking would provide, well, not a
> > true copy, but something that could play one on tv. and, like a
> > moved file (in the same filesystem), it benefits from the "copy"
> > springing into existence complete.
> That has the same failure mode: you can't rename, or hard-link,
> across separate file systems. This bites if you use File::Temp,
> which uses /tmp, and your target is somewhere else.

File::Temp does let you specify the directory, so it's easy enough to
hit the same filesystem when it matters.

Peter Haworth                | I unicycled 140 miles coast to coast for BHF
pmh at | Please sponsor me at
"It's not too late to finish this one.  In fact, if you can finish
 in less than 19 years, you will have done it faster than I did."
		-- Mark Jason Dominus, on his quiz of the *week* solution

This email (and attachments) are confidential and intended for the addressee(s) only. If you are not the intended recipient please notify the sender, 
delete any copies and do not take action in reliance on it. Any views expressed are the author's and do not represent those of IOP, except where specifically 
stated. IOP takes reasonable precautions to protect against viruses but accepts no responsibility for loss or damage arising from virus infection. 
For the protection of IOP's systems and staff emails are scanned automatically.” 

Institute of Physics Registered in England under Registration No 293851 
Registered Office:  76/78 Portland Place, London W1B 1NT  

More information about the mailing list