Written data is written immediately
$LINE[24] =~ s/not/now/;
Here, only line 24 is rewritten
continued...