my $flag = 0; local ($^I, @ARGV) = (".bak", "/var/ww/htdocs/cgi-bin/user.txt"); while (<>) { $flag = 1 if !$flag and s/\|No$/|Yes/; print; }