in reply to Editing Contents of a File

consider this bit of code:

use Tie::File; use strict; my @ry=(); # I'm not sure where $foo came from in your OP... tie @ry,"Tie::File","$foo" or die "$foo -- $!"; $_ =~s/hello/goodbye/gi foreach @ry; untie @ry;