Please give your questions meaningful titles.
You're probably better off using Tie::File for something like this.
use Tie::File; tie my @file, 'Tie::File', 'user.txt'; for (@file) { s/\|No$/|Yes/ and last; }
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
In reply to Re: Problem changing only first occurrance of pattern in file
by davorg
in thread Problem changing only first occurence of pattern in file
by JimJx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |