in reply to SOLVED!!!: search contents of one file and replace with contents of another to make a new file
Seeing open FHwithout matching close FHbothers me. The behavior might be correct -- heck, for all I know, Perl might even by design do the right thing -- but it jangles my OCD nerve.
open (FH, $f1) || die; # open file 1 in a file handle chomp(@strings = <FH>); # take off the line breaks --> close FH; open (FH, $f2) || die; # open file 2 in a file handle $text = join '', <FH>; # joins files 1 and 2? - I don't think I wa +nt to do this... --> close FH;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: search contents of one file and replace with contents of another to make a new file
by Marshall (Canon) on May 07, 2015 at 10:11 UTC | |
by marinersk (Priest) on May 08, 2015 at 23:19 UTC |