my $str = '1234567890' x 6; my $prefixLen; printf "Prefix stuff %n%s\n", $prefixLen, substr $str, 0, 35 - $prefixLen;