Yes, eating pineapple worked for me, but it has to be raw (sour). In that case, I would put a little salt in it to taste. But this is just a temporary solution because the white coating usually returns the next day or two.
I always use a tongue cleaner, then brush my tongue with ALOE VERA toothpaste which is sold by Forever Living (5 US dollars, approximately). Then, I discovered a cheaper ALOE VERA toothpaste with almost the same quality (1 US dollar). I also had a coworker with slight bad breath and I gave him the cheaper ALOE VERA toothpaste. I noticed that every time he uses that, his bad breath is gone. But every time he used an ordinary toothpaste of whatever brand, his bad breath returns.