Oh, and if your scarf is curly, just block it. Lay it out flat on a towel and steam it with a steam iron (you just hold the iron just above the scarf and let the steam come out). I just did this for the first time last night on a curly scarf and it worked wonders - and only took like 5 or 10 minutes!
this may work, but there's something crucial to remember here: stockinette always curls! every newbie discovers this. (stockinette stitch is when you knit one side, purl the other.) if you want your scarf not to curl, simply choose a stitch that has knits and purls on the same side (garter stitch, moss stitch), or put a border of such a stitch on each side of your scarf. (each long side, that is.)
for anyone interested in the finer points of why stockinette curls, check out this thread: