my $flag = 0; local ($^I, @ARGV) = (".bak", "/var/ww/htdocs/cgi-bin/user.txt"); while (<>) { $flag = 1 if !$flag and s/\|No$/|Yes/; print; }
In reply to Re: Problem changing only first occurence of pattern in file
by japhy
in thread Problem changing only first occurence of pattern in file
by JimJx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |