in reply to Packages and modules
Hi ,
The $main::var seems not to be passed as the use is implemented only during the compile time , the $main::var has to be passed within a BEGIN to make it compile first and then the use module cause the $main::var="value" is set during run time as of now . Hence a BEGIN in the perl script while you set the value , to $main::var = "value" ,so that it is also compiled with use module .