Help for this page
substr( $mask_input, $lastEnd, $start ) =~ tr[\x00-\xff][N];
# Assuming $lastEnd is initialized to 0 above ... my $replacement = 'N' x $length; substr( $mask_input, $lastEnd, $length, $replacement ); }