LDO or Switching for 24V Input, 5V Output
Using a switcher instead of a linear regulator is a no-brainer without even doing the math.  Also a LDO specifically is silly, since your problem is that you have a very large drop range.  Any linear regulator would do, not just low-dropout ones.

In case some still need convincing, let's do the math.  A linear regulator will drop 19 V, which times 100 mA is 1.9 W.  That's more than any bare package in free air will be able to dissipate and stay within operating temperature.  You'd need something like a TO-220 or TO-3 with a heatsink.  That is going to be big and expensive.

A switcher will be smaller due to not having to get rid of so much heat.  Let's say you get a buck regulator that is only 80% efficient (quite poor by today's standards).  The output power is 5 V x 100 mA = 500 mW.  500 mW / 80% = 6.25 mW into the switcher, which means it will dissipate 125 mW.  A SO-8 package or similar just normally mounted on the board can handle that kind of power.  You would be able to feel it being warm, but you wouldn't even burn your finger.