... tie my $x, 'Tie::Scalar::Substring', \$s, 1, 1; tie my $y, 'Tie::Scalar::Substring', \$s, 5, 1; ...