in reply to Trouble with Transliterate Function
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
|
|---|