Q.my 4′ pencil cactus was outside when the temp dropped to 38 F
If I cut it back, will it survive the winter indoors? Or leave as is and wait to see what happens in the east window during this winter? It is mostly firm but the ends are not turgid. The main stem is still green.

You can bring it inside for the winter. Put it in as bright a window as you have. I wouldn't do any cutting back until you see how it's recovering; if the temperature wasn't any lower than 38F, the pencil should be fine. Just be sure to check the soil for moisture down toward the bottom of the pot before watering - the plant is going to use a lot less water indoors than outside.