I remember that in my student days we had a "flame test" for identifying different plastics. I can't find it back anywhere, and I remember only part of it.
The whole idea was to cut off a small part of the plastic - I remember it said "the size of a fingernail clipping" - and hold it in the flame of a cigarette lighter.
Then we had to answer different questions like :
- does it burn or melt - or both or neither ? (neither would have been PTFE, PF or UF)
- does it go on burning out of the flame ?
- what is the smell like ?
- what is the smoke like ?
- can you pull a thread from the melting plastic ?
The test not only gave us a way to identify the plastic, it also taught us a lot about its properties and workability.
From your description I would think the plastic was polystyrene (I suppose it was a cheap pen). Did it produce a sweet smell while burning/melting ? (would be an indication of styrene). If that is the case the smoke is toxic indeed. (check wikipedia for styrene :
http://en.wikipedia.org/wiki/Styrene - the article also gives a link to the safety data sheet (MSDS).
And next time, use a small piece of plastic, like the size of a fingernail clipping (or maybe try the same thing with a fingernail clipping and compare it to some plastics)