Other options for getting 12/5 volts from 24volts
There are some limitations to using the common 3 terminal regulators and one of them is supplying them with excess input voltage. 7815/18's will deal with 24volts but 7812's will need good heatsinking if delivering any level of current. Forget 7805's at 24 volts unless you drop the voltage by other means before hand. Learnt that the hardway, and the thing is that you will generate copious amounts of heat however you try to bring the feed voltage down to a 7805 friendly level.
There is now a much better alternative depending on how much current you want. The LM2675 "simple switcher" family of regulators will deliver up to 1Amp at the specified output voltage with an input of up to 37Volts. You will need 5 components around it to make it go but you need 4 on a 3 term regulator (Input filter cap, input bypass cap, output bypass cap and output filter cap) to make that go properly(yes you can get away with just 2 caps but I'm fussy). The upside is that there is much less heat generation in comparison to the 3 term regulator.
If you want more current go to a LM2576, that will give you 3 amps.
Or if you want something more discrete then a LM 2574 is good for 500mA and can be fed with up to 60Vdc in the HV version.
For SMT try a LM22674, it has a small footprint and ideal for those little jobs.
I love the 3 terminal regs and have used them in many projects but having been put onto the the "Simple Switcher" range of regulators I'm hooked. More info on them on the National Semiconductor website. Note I'm not in any way affiliated with NS other than as a customer.
And yes you can build the THT versions on Veroboard with goods results. At least I have