Exactly. However resistors can easily be use as a preregulator for
a 7812. Create a resistor divider with 5W resistors that cuts the
35V down to 16-17V, then feed that into the 7812. Then of the 23V
that needs to be dropped, the resistors handle nearly 18V of it and
the regulator only needs to handle the last 5V or so, of which 3V
are required in headroom.
That could work, but you're dissipating more power (in your divider)
with that scheme than with the regulator alone. The extra couple of
watts may not matter much for a mains-powered device though.
A single resistor in series with the regulator can also work, with the
same power dissipation as the regulator alone, but only over a limited
range of currents. Specifically, you need to ensure that you have
sufficiently high minimum current for the voltage drop across the
resistor to keep the input to the regulator below its maximum Vin, and
sufficiently low maximum current that the drop across the resistor
keeps the input to the regulator above 15V or so.
Oh, and a 78L12 hasn't got a hope in hell of dissipating the required
power, even though the required 80-odd mA is below the 100mA current
limit of the 79Lxx series. I find it's quite rare in practice that I
get to design for the nominal 100mA current limit of 78Lxx regulators,
rather than the thermal spec. With a thermal resistance for the TO-92
junction-ambient of 230C/W and a max junction temperature of 125C, you
can only dissipate (125-25)/230 = 0.43W and that's with the
unrealistic assumption of a 25C ambient and no safety margin on the
junction temp. 0.43W at 0.1A means a maximum voltage drop of just
4.3V, even with that unrealistic ambient temp and zero safety margin.
Bump the ambient temp a bit and try to keep the junction below, say,
100C and you're struggling to dissipate enough power to pass the rated
100mA at the minimum voltage required for regulation.
A heatsink helps, of course, but you're not going to find anything
very substantial to fit a TO-92 or any of the other packages you can
find a 78Lxx in.
Tim