Let's assume the text is in the ASCII character encoding and that there is at least one period among the first 400 characters in the text.
The code you posted, and then posted again, has a defect in it. I demonstrated the defect to you in the complete, ready-to-run Perl script I posted. You haven't fixed the defect yet.
In reply to Re^2: Truncating after the last period
by Jim
in thread Truncating after the last period
by sdyates
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |