in reply to How to create a reusable routine ?

which part is it you have problems with? it would help if you told us what you already know/don't know yet.
are you familiar with writing subroutines? if not, check perlsub, please.
for creating a module, please look at perlnewmod.
if your module will contain just a few subroutines at all, it's probably the best to use Exporter und export these subroutines; otherwise it's often the better approach to go for object orientation (perlboot etc.)