...and a more general solution:
use strict; use warnings; my $str = '06roadking|Fate||Fate|||Alive|'; my $search = 'Fate|'; my $match_pos = rindex $str, $search; substr($str, $match_pos, length $search) = 'whatever'; print $str, "\n"; --output:-- 06roadking|Fate||whatever||Alive|
In reply to Re: Replacing with null
by 7stud
in thread Replacing with null
by venkatperl55
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |