This is why I asked "why are you calling the sub twice?"
You appeared to be calling the sub once to pass arguments to it, then again (without passing any arguments) to retrieve the result. That's not how subs work.
In reply to Re^2: Perl variable scoping between functions
by tobyink
in thread Perl variable scoping between functions
by Bryan882
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |