reusable code written in perl