pelp has asked for the wisdom of the Perl Monks concerning the following question:
Hi -
The problem is that I'm unable to save my changes after making subsitutions, and I don't understand why.
Here's the code.
After debugging the code myself for a bit, I don't see where the problem could lay.#!/usr/vendor/bin/perl use strict; use IO::File my $FRAME_FILE = new IO::File; my $change_on = "FChangeBar Yes"; my $change_off = "FchangeBar No"; $FRAME_FILE -> open("+<test.mif") or die "can't open file"; while (<$FRAME_FILE>) { if (/$change_on/) { s/$change_on/$change_off/g; } } $FRAME_FILE -> close;
Thanks ahead!!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Unable to save changes using IO::File
by erikharrison (Deacon) on Sep 07, 2002 at 02:08 UTC | |
Re: Unable to save changes using IO::File
by Aristotle (Chancellor) on Sep 07, 2002 at 04:51 UTC | |
by Anonymous Monk on Sep 07, 2002 at 22:55 UTC | |
(jeffa) Re: Unable to save changes using IO::File
by jeffa (Bishop) on Sep 07, 2002 at 01:31 UTC | |
by Anonymous Monk on Sep 07, 2002 at 01:52 UTC | |
by jeffa (Bishop) on Sep 07, 2002 at 04:51 UTC |
Back to
Seekers of Perl Wisdom