in reply to Alignment Program

As usual there's a module. Check out Text::Autoformat (and Text::Format).

--
Check out my Perlmonks Related Scripts like framechat, reputer, and xNN.