in reply to Perl function calls.

mysub isn't returning anything meaningful (i.e., whatever the result of the final print statement is.) What do you wish to get from it?

And why are you returning from inside of an if statement?