AW: file handle in perl

2009-06-17 Thread Thomas Bätzler
Irfan Sayed irfan_sayed2...@yahoo.com asked: i am still not able to modify existing lines in the existing file. here is my code plz help It doesn't work that way. Once you open the file for writing, it's truncated and you can't read the old contents from it anymore. Why don't you use a

Re: AW: file handle in perl

2009-06-17 Thread Irfan Sayed
Irf From: Thomas Bätzler t.baetz...@bringe.com To: beginners@perl.org Cc: Irfan Sayed irfan_sayed2...@yahoo.com Sent: Wednesday, June 17, 2009 5:38:45 PM Subject: AW: file handle in perl Irfan Sayed irfan_sayed2...@yahoo.com asked: i am still not able to modify

AW: AW: file handle in perl

2009-06-17 Thread Thomas Bätzler
Irfan Sayed irfan_sayed2...@yahoo.com wrote: OK. fine now i am able to write in a temp. file after this now i want to overwrite the contents of original file with the contents of temp. file. why i want the original file because i want to use this original file with changes in temp. file in

Re: AW: AW: file handle in perl

2009-06-17 Thread Aimee Cardenas
There's actually even a perl function called rename that does just this. Here's some good reading for you. Maybe from there you can look up other stuff when you have questions. http://perldoc.perl.org/functions/rename.html Aimee Mostella Cardenas