sub mail { my ($uid) = @_; # <-- assign argument print "uid in sub=$uid\n"; }
it maybe worked before because you also filescoped a $uid, but after passing it to the routine as argument you should also assign it.
EDIT: At least that may be the reason why strict didn't complain. Anyway in many aspects your code is too weird for me to try it out.
Cheers Rolf
In reply to Re: Scalar Value Not Available To Subroutine
by LanX
in thread Scalar Value Not Available To Subroutine
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |