use warnings; use strict; my $link = 'https://drive.google.com/file/d/1ZhXQYI-4fgx5hredv7Z0Tl2sszvN92oV/view?usp=sharing'; my $text = <## Some sample text to strip ... from. Sometimes the sentence ends with the .... We don't want to remove the period if that happens, or other punctuation in similar situations.