in reply to Converting FILEHANDLE to string
Then you could copy (or move) the new file over the old one, or check the result visually and do that manually.open (FILE, "<$file") or die "Can't open $file"; open (FILE_BU, ">$file_bu") or die "Can't open $file_bu"; while (<FILE>) { $_ =~ s/search/replace/g; print FILE_BU "$_"; } close FILE_BU; close FILE;
|
|---|