# Why does a meromorphic function with limit at infinity continue to have limit at infinity when the poles are removed?

I wanna prove the following:

If I have a meromorphic function $f$ with finitely many poles $p_{1 }, ..., p_{n}$, and it has a limit at infinity (potentially being infinity, as in, the function is meromorphic at infinity), then the entire function $g(z) = f(z)(z-p_{1 })^{m_{1}}...(z-p_{n })^{m_{n}}$ (where the $m_{n}$ are the order of the poles) also is meromorphic at infinity.

I'm using this to prove holomorphic functions from the sphere to itself are rational, but all the proofs I've found gloss over this part as obvious. If the limit at infinity is infinity or non zero, then clearly $g$ has a pole at infinity, but if the limit is zero then I'm not sure what happens.

The status of $g$ at infinity is the status of $z\mapsto g(\frac 1z)$ at $z=0$.
Now $$g\left(\frac 1z\right) = f\left(\frac 1z\right)\left(\frac 1z-p_{1 }\right)^{m_{1}}...\left(\frac 1z-p_{n }\right)^{m_{n}}$$
Which, around zero, is the product of $n+1$ meromorphic functions.
If two functions are meromorphic at infinity, then so is their product. So, since $f$ and $z\mapsto(z-p_1)^{m_1}\ldots(z-p_n)^{m_n}$ are meromorphic, so is their product.