If you can't figure it out, have you thought about asking the person who wrote it in the first place? If you have an actual question on how to do this in Perl, then you're going to get a lot more constructive advice if you show what you've attempted and where you're getting stuck or where you don't understand what is going on.