I know how you can avoid (or at least interfere with) being anally raped in prison:
Do not, under any circumstance, wipe your a** in the days leading up to your incarceration. The feces will build up and harden, ensnaring itself in your a** hair. This will create a blockage...