in reply to problem ..related to perl package concept

You don't need to put the sub in the other package in order to access that package's variables. Just refer to them explicitly, as you do in the assignment.

$var = 'one'; $mypackage::var = 'two'; sub we_got_the_func { print "Other \$var is $mypackage::var\n"; } we_got_the_func(); __END__ Other $var is 'two'