To start with you may want to have a thorough look to the documentation on modules, for example this: http://perldoc.perl.org/perlmod.html. Then you will need to go to the CPAN and look for existing modules that can take care of the various formats you need to handle.
Thanks laurent. I will look into the existing modules in CPAN and see how can i make use of them.
Can you please provide me your personal maild id (preferebly gmail) so that i can ask some questions to you.. if i am stuck anywhere.