Sub2sub-converter is a project mainly written in Perl, it's free.
github testing project, simple subtitle format converter