swift has asked for the wisdom of the Perl Monks concerning the following question:
Hi Masters
I need to add some text in file.tmp.
I used coding:
open(File, "< d:\\swift\\file.tmp"); undef $/; $F=<File>; $F.='Add Some Text at last'; close (File); open(File, "> d:\\swift\\file.tmp"); print File $F; close (File);
I feel that this coding is too long. Is there any short way to reduce it.
Thank You.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Add Contents At last in a File
by davidrw (Prior) on Aug 09, 2005 at 03:10 UTC | |
|
Re: Add Contents At last in a File
by jpeg (Chaplain) on Aug 09, 2005 at 03:22 UTC | |
by AReed (Pilgrim) on Aug 09, 2005 at 13:34 UTC | |
|
Re: Add Contents At last in a File
by gopalr (Priest) on Aug 09, 2005 at 03:02 UTC | |
|
Re: Add Contents At last in a File
by sh1tn (Priest) on Aug 09, 2005 at 09:41 UTC |