substr( $mask_input, $lastEnd, $start ) =~ tr[\x00-\xff][N];
Why use tr at all? Just use substr:
# Assuming $lastEnd is initialized to 0 above my $length = $start - $lastEnd; if ($length) { my $replacement = 'N' x $length; substr( $mask_input, $lastEnd, $length, $replacement ); }
-QM
--
Quantum Mechanics: The dreams stuff is made of
In reply to Re: Trouble with Transliterate Function
by QM
in thread Trouble with Transliterate Function
by ccelt09
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |