Reusable Code for PERL