Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: find & replace a string in perl

by k_manimuthu (Monk)
on Nov 25, 2010 at 07:51 UTC ( #873591=note: print w/replies, xml ) Need Help??


in reply to find & replace a string in perl

For your code, you use the same file handler (INF) for read and appened. When you are open a file handle for append mode, the file position is shows the end of the file. You may use another file handle for write mode, then you able to got the expected output.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://873591]
help
Chatterbox?
[Discipulus]: good morning folks!

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2017-10-17 06:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (220 votes). Check out past polls.

    Notices?