in reply to
\s matches newline in regex?
You can use non-greedy matching and $ to match whitespace up until a newline.
$line =~ s/Hi\s*?$//m;
[download]
Comment on
Re: \s matches newline in regex?
Download
Code
In Section
Seekers of Perl Wisdom