Hi arunnich,
A lot of people know how to do that here. But you probably wont get any solutions. It's because we're here to try and help other people learn Perl, and not to give out complete solutions. If you try and write a script, and show us what you have tried, and where it went wrong, then you're much more likely to get help here.
Try reading the Perl Monks guide to the Monastery to see what we're all about.
C.