Calculating $\int_{|z|=2}\frac{e^{1/z^2}}{1-z}dz$ 
Find the value of $\displaystyle\int_{|z|=2}\frac{e^{1/z^2}}{1-z}dz$

The first idea I had was to apply Cauchy's integral formula. But can this be done? $e^{1/z^2}$ is not holomorphic on the interior of $|z|=2$. Still, if we would apply this we would obtain:
$\displaystyle\int_{|z|=2}\frac{e^{1/z^2}}{1-z}dz=-2\pi ie$.
Another way I think, is to apply the residue theorem. For $1-z$ has a simple zero at $z=1$ and $e^{1/1^2}\neq 0$, then the residue of $e^{1/z^2}/(1-z)$ at $z=0$ is $-e$. Again we obtain $2\pi iRes(g;0)=-2\pi ie$, where $g=\frac{e^{1/z^2}}{1-z}$.
But again, it seems to me this is not right because $g$ has two singularities, at $z=1$ and $z=0$. What we might do about $z=0$? The answer is not $-2\pi i e$?
 A: Forget the singularity at $z = 0$, essential singularity is usually tricky to handle.
Instead, deform contour to infinity and evaluate the integral by picking up the residue at pole $z = \infty$.
We first change variable to $\rho = \frac{1}{z}$. The only thing to watch is under
such a change, the counterclockwise contour $|z| = 2$ becomes a clockwise contour $|\rho| = \frac12$. If one flip the orientation of the $|\rho| = \frac12$ contour
back to a counterclockwise one, it will pick up an extra minus sign. 
In any event, we have:
$$\begin{align}\oint_{|z|=2, \text{ccw}} \frac{e^{1/z^2}}{1-z} dz
&= \oint_{|\rho|=\frac12, \text{cw}} \frac{e^{\rho^2}}{1 - \frac{1}{\rho}}\left(-\frac{d\rho}{\rho^2}\right)
= \oint_{|\rho|=\frac12, \text{ccw}}\frac{e^{\rho^2}}{\rho(\rho-1)}d\rho\\
&= 2\pi i \mathop{\text{Res}}_{\rho=0}\left(\frac{e^{\rho^2}}{\rho-1}\right)
= -2\pi i
\end{align}
$$
A: For the residue at $z=0$ we note
$$e^{1/z^2}=\sum_{k=0}^\infty \frac{z^{-2k}}{k!}$$
and 
$$\frac{1}{1-z}=\sum_{\ell=0}^\infty z^\ell$$
Therefore, 
$$\frac{e^{1/z^2}}{1-z}=\sum_{\ell=0}^\infty \sum_{k=0}^\infty \frac{z^{\ell-2k}}{k!}$$
The coefficient on the $z^{-1}$ term is $\sum_{k=1}^\infty \frac{1}{k!}=e-1$.
Therefore, the residue at $z=0$ is $2\pi i(e-1)$.  Inasmuch as the residue at $z=1$ is $-2\pi i e$ the value of the integral is $-2\pi i$.
