Originally Posted by vamsiv
Not really a perl programmer, worked with java and c++ only unfortunately
You could write it in java or c++, but it would be harder and less likely to work, and more bugs. But since you're not a perl programmer, maybe you should use java or c++.
On the other hand, perl isn't very hard to learn. If you're already a programmer, you should be able to figure it out. You could start with simple stuff like writing a program which simply reads the input file line by line, and copies it to the output file with no changes. Then try modifying that program to make it detect the start and end of records. Then modify it again so that it produces the output you want.
The perl functions you are likely to use may include: open, close, <>, m//, die, and print. That probably looks like gibberish, but once you understand it, you'll be well on the way to solving the problem.