in reply to Re^2: search for string append in file
in thread search for string append in file

So this? Its a common pattern;
while(<$in>){ print $out $_; if( /word/ ){ print $out scalar <$in>, "APPEND"; } } close $in; close $out; rename $outfile, $infile;
Having a gander at How do I post a question effectively? and How (Not) To Ask A Question might help you help us help you :)

Replies are listed 'Best First'.
Re^4: search for string append in file
by Bronston (Novice) on Dec 25, 2010 at 02:06 UTC

    That might do it, I will plug it in and see. Thank you very much.