Limit a.e. of a sequence measurable functions is measurable

I'm having trouble showing the following:

If $f_n$ is a sequence of measurable functions such that $f_n$ converges to $f$ almost everywhere, then $f$ is measurable.

I was thinking of using $\limsup$ since I know that $\limsup f_n$ is measurable. But now I'm not sure how to continue my argument.

-
Well, if $a_n$ converges to $a$, then $\limsup a_n = a$. So if $f_n$ converges to $f$ almost everywhere, then $\limsup f_n$ is equal to $f$ almost everywhere. Can you show that if $g$ is measurable, and $f=g$ a.e., then $f$ is measurable? –  Arturo Magidin Feb 26 '11 at 0:51
ah i see now. i was just missing the last piece. thanks –  jack Feb 26 '11 at 0:55
Note that this only holds if your measure is complete. –  Nate Eldredge Feb 26 '11 at 1:13

Based on your comment, it looks like you have a handle on the argument. A limsup of a sequence of measurable functions is an inf of a sequence of functions each of which is a sup of a sequence of measurable functions, so it reduces to showing that both infs and sups of sequences of measurable functions are measurable. Assuming you're working with a complete measure, it doesn't matter what happens on the set of measure zero where $(f_n)$ does not converge to $f$.
Just for fun, here's another way to think of this, assuming the functions are all defined on $[0,1]$ with Lebesgue measure. By Egoroff's theorem, off of a set $A$ of arbitrarily small measure, $f_n\to f$ uniformly. By Lusin's theorem, off of a set $B$ of arbitrarily small measure each $f_n$ is continuous (you can apply Lusin to each function with progressively smaller exceptional sets and take $B$ to be the union of these sets). Off of $A\cup B$, $f$ is a uniform limit of a sequence of continuous functions, hence continuous. As came up at another question, a function that is continuous off of sets of arbitrarily small measure is measurable.