Unit? Module? same difference, is it not?
Sorry to be so pedantic but it may be relevant to solving your problem. When you said in your post
I have global var in main unit:
do you mean that code is in the 'main' part of package manageusers. At the top maybe before the subroutines declaration ? poj@EXPORT = qw( $LoggedOn_user_id $VERSION = '0.0.1'; } our $LoggedOn_user_id;