Normally HTML ignores newlines. There are (at least) two simple ways of including output from a Unix command.
One is to enclose the output in <pre> and </pre>, so that
newlines, like this one -->
are not ignored.
It also tells the browser to use a monospaced font,
so that text in columns
will line up correctly.
On the other hand, you may decide that the monospaced text looks kind of ugly.
The other way is to enclose each line in the HTML sequence <p> ... </p> like this (caution: not tested):
$whois =~ s{^}{<p>}mg;
$whois =~ s{$}{</p>}mg;