in reply to search/replace very large file w/o linebreaks

Set the input record separator to be equal to one of the tags, and read the file in a bit at a time that way.

{ local $/ = "<tag1>"; while ( my $paragraph = <FILE> ) { $paragraph =~ s/<tag1>/\n/g; $paragraph =~ s/<tag2>/\t/g; print OUTFILE $paragraph; } }


Dave