How to cut a small cylinder out of a chunk of foam with some precision I have a parallelogram shaped chunk of foam, the kind of foam you find in headphone ear pads. Let's say it's 50mm long on both sides and 5mm thick.

What is the best way to cut 5mm long, 2mm diameter cylinders out of this parallelogram chunk? I need to do it with reasonable precision. I have no special tools but can buy something indicated for this task.

The only thing I can think of would be something like a fruit corer but on a much smaller scale...

I dont know if any such thing exists, though.
I would try to use one of the leather hole punchers in the right size. They come in different shapes, for your use I would look for the straight version. Like in this picture.
There is also a wider version, which can work well.
And if your hole is small enough and near enough the side of the foam, a pliers like tool (as in the picture on this page) may work. The page describes the other shapes as well.

And there is also something called a cork borer, which I have never seen in real life, which looks like it should work.

Those of the tools that do not have a base to them works best when you put a layer under your work, I learned that the end-grain of wood work well but a modern cutting mat may do as well, certainly when you only use hand power and not a hammer to push it through.