The OP was incomplete with more details dribbled out as the OPer deflected and discounted the offered possible solutions. My question was attempting to get the OPer to give more clues as to the experience level and goals.
On my XP laptop under the audio properties the microphone input level can be set. The OP doesn't say why the level needs to be set in the Perl program or if it needs to be continiously changed. Maybe the OP wants to implement compression or some effect. I didn't want to invest too much effort in answering someone who didn't search google for the modules or to give better details up front but it is a topic I am highly interested in.