Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Unable to save changes using IO::File

by erikharrison (Deacon)
on Sep 07, 2002 at 02:08 UTC ( #195822=note: print w/ replies, xml ) Need Help??


in reply to Unable to save changes using IO::File

You are opening a file, reading it's contents, and then altering those contents in memory. Your not operating on the file directly nor are you writing the changes back to the file. Solving these problems is left as an exercise to the reader, but your code shows enough competence that I imagine you'll fix it quickly. A suggestion though - if I were in this position, unless the filehandle object needed to stick around for other reasons (or maybe even if it did) I'd prolly use Tie::File. Check it out on the CPAN.

Cheers,
Erik

Light a man a fire, he's warm for a day. Catch a man on fire, and he's warm for the rest of his life. - Terry Pratchet


Comment on Re: Unable to save changes using IO::File

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (11)
As of 2014-10-02 12:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (56 votes), past polls