On 5/15/07, Ken Foskey <[EMAIL PROTECTED]> wrote:
> It looks as if you're trying to edit a text file "in place". Although
> that's possible for some simple cases, it's generally easier to use
> Perl's $^I functionality.
>
What is $^I?
It is a special scalar variable that turns on/off in-place editing.
from perldoc perlvar
$^I The current value of the inplace-edit extension. Use "undef"
to disable inplace editing. (Mnemonic: value of -i switch.)
from perldoc perlrun
-i[extension]
specifies that files processed by the "<>" construct are to be
edited in-place. It does this by renaming the input file, opening
the output file by the original name, and selecting that output
file as the default for print() statements.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/