in reply to Copying a file to a temporary file

For inplace editing I suggest you look at -i switch or Super Search for 'inplace edit'

perl -pi.bak -e 's/this stuff/that stuff/g' some files

As for creating a temporary file. There is lots of that on Super Search too, but once you have a temp file handle you can just use open and <> or read and print......

You will find the guts of File::Temp in a 15 line function here Re: Avoiding race condition with sysopen

cheers

tachyon