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;