Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Copying a file to a temporary file

by tachyon (Chancellor)
on Jun 15, 2004 at 13:15 UTC ( [id://366872]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-25 23:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found