The '1' being printed the return value of s///, which (in scalar context) is the number of substitutions performed (1, in this case). You're also unintentionally removing the word 'total'. Solution:
if(/^call started/){ s/^call.*total/Modem Line 0\/$i : total/; print OUT "$_\n"; $i++; }
In reply to Re: while loop, search & replace
by ikegami
in thread while loop, search & replace
by PJT
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |