Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Opening the same file over and over. Shorter way to do this?

by Cubes (Pilgrim)
on Aug 01, 2001 at 18:17 UTC ( [id://101374]=note: print w/replies, xml ) Need Help??


in reply to Opening the same file over and over. Shorter way to do this?

You might also want to take a look at seek, tell, and truncate. You can lock the file, open it once with +>> (read/write access in append mode, so you don't blow away whatever's already in there), then use these calls to do everything you need to do before closing and unlocking the file.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2024-09-17 08:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (22 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.