Maybe this is an old wives tale, but I heard somewhere that you should eat cotton balls if you swallow something like that. Supposedly it'll wrap around the foreign object before it goes through your intestines, minimizing any damage that could be done otherwise.
In reality, though, you should probably go to the ER if you really think you've swallowed glass.