Both split paths at all Anchor Points, which is hopefully what you wish.
Is it possible to automatically split a path into a variable number of individual segments?
The fly-in-the-ointment here is the operative phrase "variable number". The answer depends on what you mean by that.
There are awkward workaround tricks for adding a given number of anchorpoints per segment to an existing path:
1. Select the path.
2. Filter>Distort>ZigZag. Size: 0. Ridges Per Segment: [as desired]. Points: Smooth.
You can then follow that by either of the methods mentioned by Jacob, or by:
The possibly deal-breaking caveat is step 2. It can be used to add the desired number of segments per original segment, but that necessarily means you are limited to total numbers of segments that are divisible by the original number of segments. Plus, it results in (for practical purposes) same-length segments per original segment, but in no way guarantees same-length segments along the whole path.
To expand on James' explanation: If you need regular segments, a workaround would be to use path text and type in a lot of underscores. By adjusting the baseline shift, you should be able to get an averaged representation of the path with regular segments. The segment length then wouild be controlled by the font size and font face, obviously. Not perfect, but better than dashes. Everything else would probably require a proper script that uses a curve fitting or triangulation algorithm to create straight edges from arbitrary shapes...