in reply to Unable to save changes using IO::File
or simpler s/$change_on/$change_off/g while <$FRAME_FILE>; In fact, you can use substitutions in conditions as well:while (<$FRAME_FILE>) { s/$change_on/$change_off/g; }
The block will only execute if a substitution happened.if(s/$change_on/$change_off/) { ... }
Makeshifts last the longest.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Unable to save changes using IO::File
by Anonymous Monk on Sep 07, 2002 at 22:55 UTC |