tulsyan has asked for the wisdom of the Perl Monks concerning the following question:
MONKS,
I am new this perl group.
I need ur help. That is, Is it possible to modify the file without using any Temporary variable
use strict; open (JE, "< c:\\tuls\\tuls.txt") || die "Can not open the file "; my $ou; while (<JE>) { $_=~s/findtext/changetext/g; $ou.=$_; } close(JE); open (JE, "> c:\\tuls\\tuls.txt") ; print JE $ou; close (JE);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Modify file without any temp variable
by gopalr (Priest) on Jul 20, 2005 at 07:15 UTC | |
by Pied (Monk) on Jun 20, 2007 at 23:10 UTC | |
|
Re: Modify file without any temp variable
by GrandFather (Saint) on Jul 20, 2005 at 07:22 UTC | |
by tulsyan (Beadle) on Jul 20, 2005 at 07:32 UTC | |
by gopalr (Priest) on Jul 20, 2005 at 07:35 UTC | |
|
Re: Modify file without any temp variable
by rev_1318 (Chaplain) on Jul 20, 2005 at 07:48 UTC | |
by GrandFather (Saint) on Jul 20, 2005 at 09:40 UTC | |
|
Re: Modify file without any temp variable
by Llew_Llaw_Gyffes (Scribe) on Jul 20, 2005 at 20:23 UTC |