in reply to Why is this incorrect?

You've failed to show working code. And your parameter passing to your functions is wrong. You need to get the arguments from the @_ array, not from $_.

Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart