in reply to perl script

What have you done? That might help us to give solution to you.