See perlintro, section "Writing subroutines"
You should read the rest of that document too.
In reply to Re: private sub routine by moritz in thread private sub routine by saranperl